diff options
author | Liong Sauw Ming <ming@teluu.com> | 2012-12-12 06:20:28 +0000 |
---|---|---|
committer | Liong Sauw Ming <ming@teluu.com> | 2012-12-12 06:20:28 +0000 |
commit | f9fd865beaaa26b234f1a603c1149e51d782c862 (patch) | |
tree | 98d6a98bb09790b4c5c359cde7f8db0763ba7577 | |
parent | 05d4e8df4d6b13628230fc69af143843a06e6839 (diff) |
Fixed #1598: Assertion when sip error code is not set (thanks Peter Koletzki for the report)
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4306 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r-- | pjsip/src/pjsua-lib/pjsua_call.c | 2 | ||||
-rw-r--r-- | pjsip/src/pjsua-lib/pjsua_media.c | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_call.c b/pjsip/src/pjsua-lib/pjsua_call.c index 8fe7f5ef..297f4eb0 100644 --- a/pjsip/src/pjsua-lib/pjsua_call.c +++ b/pjsip/src/pjsua-lib/pjsua_call.c @@ -1029,7 +1029,7 @@ pj_bool_t pjsua_call_on_incoming(pjsip_rx_data *rdata) int acc_id; pjsua_call *call; int call_id = -1; - int sip_err_code; + int sip_err_code = PJSIP_SC_INTERNAL_SERVER_ERROR; pjmedia_sdp_session *offer=NULL; pj_status_t status; diff --git a/pjsip/src/pjsua-lib/pjsua_media.c b/pjsip/src/pjsua-lib/pjsua_media.c index abfeea7d..4797dba9 100644 --- a/pjsip/src/pjsua-lib/pjsua_media.c +++ b/pjsip/src/pjsua-lib/pjsua_media.c @@ -1515,8 +1515,10 @@ pj_status_t pjsua_media_channel_init(pjsua_call_id call_id, * (e.g. in reinvites, updates, etc). */ - if (pjsua_get_state() != PJSUA_STATE_RUNNING) + if (pjsua_get_state() != PJSUA_STATE_RUNNING) { + if (sip_err_code) *sip_err_code = PJSIP_SC_SERVICE_UNAVAILABLE; return PJ_EBUSY; + } if (async) { pj_pool_t *tmppool = (call->inv? call->inv->pool_prov: |