summaryrefslogtreecommitdiff
path: root/res/stasis
diff options
context:
space:
mode:
authorCorey Farrell <git@cfware.com>2018-01-07 22:38:49 -0500
committerCorey Farrell <git@cfware.com>2018-01-07 23:00:33 -0500
commit8b3083cac53df630a03e4f233701ac94c730ef95 (patch)
tree76291935cf472bef485b87a6398738c74f7a2d60 /res/stasis
parent634d30fb9e1459ca0119d8ff7a75282f2d72bcd9 (diff)
res_stasis: Fix dial bridge unload.
If the dial bridge has been created it must be released by calling ast_bridge_destroy, simply releasing the ao2 reference is not enough. Also move stasis_app_control_shutdown earlier in unload to ensure the bridge cannot be created or grabbed after the app_bridges container is released. Change-Id: I372302de94ca63876069e2585a049c5060e5e767
Diffstat (limited to 'res/stasis')
-rw-r--r--res/stasis/control.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/res/stasis/control.c b/res/stasis/control.c
index 655fc1f69..3a6dec2b6 100644
--- a/res/stasis/control.c
+++ b/res/stasis/control.c
@@ -1544,7 +1544,9 @@ void stasis_app_control_shutdown(void)
{
ast_mutex_lock(&dial_bridge_lock);
shutting_down = 1;
- ao2_cleanup(dial_bridge);
- dial_bridge = NULL;
+ if (dial_bridge) {
+ ast_bridge_destroy(dial_bridge, 0);
+ dial_bridge = NULL;
+ }
ast_mutex_unlock(&dial_bridge_lock);
}