summaryrefslogtreecommitdiff
path: root/pjsip
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2008-06-26 15:46:52 +0000
committerBenny Prijono <bennylp@teluu.com>2008-06-26 15:46:52 +0000
commit4012aae3e4d73758ee47ed9978ff537c9912d0f9 (patch)
tree663d7e9fc2c36d8fc07b48b7c689305577a814c9 /pjsip
parent657affe0e2a8f1a30ff48478140278196285843e (diff)
Fixed bug: media got deactivated when SDP negotiation fails on re-INVITE or UPDATE while it should be unaffected
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2060 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip')
-rw-r--r--pjsip/src/pjsua-lib/pjsua_call.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_call.c b/pjsip/src/pjsua-lib/pjsua_call.c
index 6e5c5638..b5482957 100644
--- a/pjsip/src/pjsua-lib/pjsua_call.c
+++ b/pjsip/src/pjsua-lib/pjsua_call.c
@@ -2521,8 +2521,13 @@ static void pjsua_call_on_media_update(pjsip_inv_session *inv,
pjsua_perror(THIS_FILE, "SDP negotiation has failed", status);
+ /* Do not deinitialize media since this may be a re-INVITE or
+ * UPDATE (which in this case the media should not get affected
+ * by the failed re-INVITE/UPDATE). The media will be shutdown
+ * when call is disconnected anyway.
+ */
/* Stop/destroy media, if any */
- pjsua_media_channel_deinit(call->index);
+ /*pjsua_media_channel_deinit(call->index);*/
/* Disconnect call if we're not in the middle of initializing an
* UAS dialog and if this is not a re-INVITE
@@ -2570,7 +2575,10 @@ static void pjsua_call_on_media_update(pjsip_inv_session *inv,
pjsua_perror(THIS_FILE, "Unable to create media session",
status);
call_disconnect(inv, PJSIP_SC_NOT_ACCEPTABLE_HERE);
- pjsua_media_channel_deinit(call->index);
+ /* No need to deinitialize; media will be shutdown when call
+ * state is disconnected anyway.
+ */
+ /*pjsua_media_channel_deinit(call->index);*/
PJSUA_UNLOCK();
return;
}