diff options
author | Benny Prijono <bennylp@teluu.com> | 2009-11-11 00:21:55 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2009-11-11 00:21:55 +0000 |
commit | 82c659bf686e51ce6c62bf855dca777f0479b85b (patch) | |
tree | 666a77c7597941a55919c1bf53bd3534706ec512 /pjsip/src | |
parent | 279985cc2749a08bb8458517df5038062e776c6f (diff) |
Misc (#951): check when app specifies max_calls that is greater than PJSUA_MAX_CALLS (thanks Robbie Hanson for the report)
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3012 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/src')
-rw-r--r-- | pjsip/src/pjsua-lib/pjsua_core.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_core.c b/pjsip/src/pjsua-lib/pjsua_core.c index 6e41cbe0..7c428d18 100644 --- a/pjsip/src/pjsua-lib/pjsua_core.c +++ b/pjsip/src/pjsua-lib/pjsua_core.c @@ -683,6 +683,12 @@ PJ_DEF(pj_status_t) pjsua_init( const pjsua_config *ua_cfg, return status; } + /* Verify settings */ + if (ua_cfg->max_calls >= PJSUA_MAX_CALLS) { + pjsua_perror(THIS_FILE, "Invalid max_calls setting", PJ_ETOOMANY); + return PJ_EINVAL; + } + /* If nameserver is configured, create DNS resolver instance and * set it to be used by SIP resolver. */ |