summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2009-11-11 00:33:00 +0000
committerBenny Prijono <bennylp@teluu.com>2009-11-11 00:33:00 +0000
commit06d2a69f079a3d995ce62a6b7641eb348afdf044 (patch)
treea49468a71d8df160d27075850f42f3511f9ec4ae
parent82c659bf686e51ce6c62bf855dca777f0479b85b (diff)
Misc (#951): undo r3012, and silently adjust max_calls to PJSUA_MAX_CALLS instead if it is greater
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3013 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r--pjsip/src/pjsua-lib/pjsua_call.c5
-rw-r--r--pjsip/src/pjsua-lib/pjsua_core.c6
2 files changed, 5 insertions, 6 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_call.c b/pjsip/src/pjsua-lib/pjsua_call.c
index 5a19d95b..cc9eaad9 100644
--- a/pjsip/src/pjsua-lib/pjsua_call.c
+++ b/pjsip/src/pjsua-lib/pjsua_call.c
@@ -133,6 +133,11 @@ pj_status_t pjsua_call_subsys_init(const pjsua_config *cfg)
/* Copy config */
pjsua_config_dup(pjsua_var.pool, &pjsua_var.ua_cfg, cfg);
+ /* Verify settings */
+ if (pjsua_var.ua_cfg.max_calls >= PJSUA_MAX_CALLS) {
+ pjsua_var.ua_cfg.max_calls = PJSUA_MAX_CALLS;
+ }
+
/* Check the route URI's and force loose route if required */
for (i=0; i<pjsua_var.ua_cfg.outbound_proxy_cnt; ++i) {
status = normalize_route_uri(pjsua_var.pool,
diff --git a/pjsip/src/pjsua-lib/pjsua_core.c b/pjsip/src/pjsua-lib/pjsua_core.c
index 7c428d18..6e41cbe0 100644
--- a/pjsip/src/pjsua-lib/pjsua_core.c
+++ b/pjsip/src/pjsua-lib/pjsua_core.c
@@ -683,12 +683,6 @@ 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.
*/