[asterisk-commits] Revert "res pjsip session: Release media resources on sessio... (asterisk[15])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Aug 1 16:37:34 CDT 2017


George Joseph has submitted this change and it was merged. ( https://gerrit.asterisk.org/6122 )

Change subject: Revert "res_pjsip_session: Release media resources on session end quicker."
......................................................................

Revert "res_pjsip_session: Release media resources on session end quicker."

This reverts commit 6c374d863c420d2519a52fffba3de5f935a30cdb.

Change-Id: Ia89836005df66ef540885afd6f171886de0db442
---
M channels/chan_pjsip.c
M res/res_pjsip_session.c
2 files changed, 3 insertions(+), 13 deletions(-)

Approvals:
  George Joseph: Looks good to me, approved; Approved for Submit



diff --git a/channels/chan_pjsip.c b/channels/chan_pjsip.c
index dd03b74..ebda6c7 100644
--- a/channels/chan_pjsip.c
+++ b/channels/chan_pjsip.c
@@ -2273,6 +2273,7 @@
 static void clear_session_and_channel(struct ast_sip_session *session, struct ast_channel *ast)
 {
 	session->channel = NULL;
+	set_channel_on_rtp_instance(session, "");
 	ast_channel_tech_pvt_set(ast, NULL);
 }
 
diff --git a/res/res_pjsip_session.c b/res/res_pjsip_session.c
index 40b197b..bb349a4 100644
--- a/res/res_pjsip_session.c
+++ b/res/res_pjsip_session.c
@@ -1872,12 +1872,8 @@
 
 	ast_taskprocessor_unreference(session->serializer);
 	ao2_cleanup(session->datastores);
-	if (session->active_media_state) {
-		ast_sip_session_media_state_free(session->active_media_state);
-	}
-	if (session->pending_media_state) {
-		ast_sip_session_media_state_free(session->pending_media_state);
-	}
+	ast_sip_session_media_state_free(session->active_media_state);
+	ast_sip_session_media_state_free(session->pending_media_state);
 
 	AST_LIST_HEAD_DESTROY(&session->supplements);
 	while ((delay = AST_LIST_REMOVE_HEAD(&session->delayed_requests, next))) {
@@ -3138,13 +3134,6 @@
 			iter->session_end(session);
 		}
 	}
-
-	/* Release any media resources. */
-	ast_sip_session_media_state_free(session->active_media_state);
-	session->active_media_state = NULL;
-	ast_sip_session_media_state_free(session->pending_media_state);
-	session->pending_media_state = NULL;
-
 	return 0;
 }
 

-- 
To view, visit https://gerrit.asterisk.org/6122
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia89836005df66ef540885afd6f171886de0db442
Gerrit-Change-Number: 6122
Gerrit-PatchSet: 2
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Scott Griepentrog <sgriepentrog at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-commits/attachments/20170801/66f7342c/attachment.html>


More information about the asterisk-commits mailing list