<p>Jenkins2 <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/7869">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Benjamin Keith Ford: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, approved
Jenkins2: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_stasis: Fix dial bridge unload.<br><br>If the dial bridge has been created it must be released by calling<br>ast_bridge_destroy, simply releasing the ao2 reference is not enough.<br><br>Also move stasis_app_control_shutdown earlier in unload to ensure the<br>bridge cannot be created or grabbed after the app_bridges container is<br>released.<br><br>Change-Id: I372302de94ca63876069e2585a049c5060e5e767<br>---<br>M res/res_stasis.c<br>M res/stasis/control.c<br>2 files changed, 7 insertions(+), 4 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/res/res_stasis.c b/res/res_stasis.c<br>index 42a19bf..1f5296d 100644<br>--- a/res/res_stasis.c<br>+++ b/res/res_stasis.c<br>@@ -1992,6 +1992,9 @@<br> messaging_cleanup();<br> <br> cleanup();<br>+<br>+ stasis_app_control_shutdown();<br>+<br> ao2_cleanup(apps_registry);<br> apps_registry = NULL;<br> <br>@@ -2006,8 +2009,6 @@<br> <br> ao2_cleanup(app_bridges_playback);<br> app_bridges_playback = NULL;<br>-<br>- stasis_app_control_shutdown();<br> <br> STASIS_MESSAGE_TYPE_CLEANUP(end_message_type);<br> STASIS_MESSAGE_TYPE_CLEANUP(start_message_type);<br>diff --git a/res/stasis/control.c b/res/stasis/control.c<br>index 314d68a..8199e46 100644<br>--- a/res/stasis/control.c<br>+++ b/res/stasis/control.c<br>@@ -1507,7 +1507,9 @@<br> {<br> ast_mutex_lock(&dial_bridge_lock);<br> shutting_down = 1;<br>- ao2_cleanup(dial_bridge);<br>- dial_bridge = NULL;<br>+ if (dial_bridge) {<br>+ ast_bridge_destroy(dial_bridge, 0);<br>+ dial_bridge = NULL;<br>+ }<br> ast_mutex_unlock(&dial_bridge_lock);<br> }<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/7869">change 7869</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/7869"/><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: I372302de94ca63876069e2585a049c5060e5e767 </div>
<div style="display:none"> Gerrit-Change-Number: 7869 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>