<p>George Joseph <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/6122">View Change</a></p><div style="white-space:pre-wrap">Approvals:
George Joseph: Looks good to me, approved; Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Revert "res_pjsip_session: Release media resources on session end quicker."<br><br>This reverts commit 6c374d863c420d2519a52fffba3de5f935a30cdb.<br><br>Change-Id: Ia89836005df66ef540885afd6f171886de0db442<br>---<br>M channels/chan_pjsip.c<br>M res/res_pjsip_session.c<br>2 files changed, 3 insertions(+), 13 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/channels/chan_pjsip.c b/channels/chan_pjsip.c<br>index dd03b74..ebda6c7 100644<br>--- a/channels/chan_pjsip.c<br>+++ b/channels/chan_pjsip.c<br>@@ -2273,6 +2273,7 @@<br> static void clear_session_and_channel(struct ast_sip_session *session, struct ast_channel *ast)<br> {<br> session->channel = NULL;<br>+ set_channel_on_rtp_instance(session, "");<br> ast_channel_tech_pvt_set(ast, NULL);<br> }<br> <br>diff --git a/res/res_pjsip_session.c b/res/res_pjsip_session.c<br>index 40b197b..bb349a4 100644<br>--- a/res/res_pjsip_session.c<br>+++ b/res/res_pjsip_session.c<br>@@ -1872,12 +1872,8 @@<br> <br> ast_taskprocessor_unreference(session->serializer);<br> ao2_cleanup(session->datastores);<br>- if (session->active_media_state) {<br>- ast_sip_session_media_state_free(session->active_media_state);<br>- }<br>- if (session->pending_media_state) {<br>- ast_sip_session_media_state_free(session->pending_media_state);<br>- }<br>+ ast_sip_session_media_state_free(session->active_media_state);<br>+ ast_sip_session_media_state_free(session->pending_media_state);<br> <br> AST_LIST_HEAD_DESTROY(&session->supplements);<br> while ((delay = AST_LIST_REMOVE_HEAD(&session->delayed_requests, next))) {<br>@@ -3138,13 +3134,6 @@<br> iter->session_end(session);<br> }<br> }<br>-<br>- /* Release any media resources. */<br>- ast_sip_session_media_state_free(session->active_media_state);<br>- session->active_media_state = NULL;<br>- ast_sip_session_media_state_free(session->pending_media_state);<br>- session->pending_media_state = NULL;<br>-<br> return 0;<br> }<br> <br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6122">change 6122</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/6122"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 15 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: Ia89836005df66ef540885afd6f171886de0db442 </div>
<div style="display:none"> Gerrit-Change-Number: 6122 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Scott Griepentrog <sgriepentrog@digium.com> </div>