From 4012aae3e4d73758ee47ed9978ff537c9912d0f9 Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Thu, 26 Jun 2008 15:46:52 +0000 Subject: 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 --- pjsip/src/pjsua-lib/pjsua_call.c | 12 ++++++++++-- 1 file 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; } -- cgit v1.2.3