diff options
author | Riza Sulistyo <riza@teluu.com> | 2015-05-05 03:49:49 +0000 |
---|---|---|
committer | Riza Sulistyo <riza@teluu.com> | 2015-05-05 03:49:49 +0000 |
commit | 02031f3424d95ab7b25cf0fbed9358aa3f1f405f (patch) | |
tree | a3bd8e2120345240aaa2e542a786e951c09c60d8 | |
parent | c62c7d34a4ed81020bec7a072ce508b44355c49c (diff) |
Re #1848: Fix failed to create SDP which lead to crash caused by rejected HOLD request.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@5082 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r-- | pjsip/src/pjsua-lib/pjsua_call.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_call.c b/pjsip/src/pjsua-lib/pjsua_call.c index eeba99fe..7a82e3e1 100644 --- a/pjsip/src/pjsua-lib/pjsua_call.c +++ b/pjsip/src/pjsua-lib/pjsua_call.c @@ -4166,6 +4166,16 @@ static void pjsua_call_on_create_offer(pjsip_inv_session *inv, PJ_LOG(4,(THIS_FILE, "Call %d: asked to send a new offer", call->index)); + if (call->med_prov_cnt == 0) { + status = pjsua_media_channel_init(call->index, inv->role, + call->secure_level, inv->pool_prov, + NULL, NULL, PJ_FALSE, NULL); + if (status != PJ_SUCCESS) { + pjsua_perror(THIS_FILE, "Unable to create offer", status); + goto on_return; + } + } + status = pjsua_media_channel_create_sdp(call->index, call->inv->pool_prov, NULL, offer, NULL); |