summaryrefslogtreecommitdiff
path: root/main/app.c
diff options
context:
space:
mode:
authorMatthew Jordan <mjordan@digium.com>2013-06-09 21:11:25 +0000
committerMatthew Jordan <mjordan@digium.com>2013-06-09 21:11:25 +0000
commitcfa94a99745b78e7f6ca5d4dba6579151a0aa922 (patch)
tree0686dbeb4bbc060177942ea377e33a3ffcc0a238 /main/app.c
parent3421960162a4857eb365dd87ccf4cd6202643cd4 (diff)
Clean up MWI topic pool before message type destruction
Topics need to be disposed of prior to the message types that are published on them. This includes topic pools. This prevents an assertion from being raised on shutdown. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391040 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/app.c')
-rw-r--r--main/app.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/app.c b/main/app.c
index 03c1a1e5d..0b829cc0e 100644
--- a/main/app.c
+++ b/main/app.c
@@ -2818,13 +2818,13 @@ struct stasis_message *ast_mwi_blob_create(struct ast_mwi_state *mwi_state,
static void app_cleanup(void)
{
+ ao2_cleanup(mwi_topic_pool);
+ mwi_topic_pool = NULL;
ao2_cleanup(mwi_topic_all);
mwi_topic_all = NULL;
mwi_topic_cached = stasis_caching_unsubscribe_and_join(mwi_topic_cached);
STASIS_MESSAGE_TYPE_CLEANUP(ast_mwi_state_type);
STASIS_MESSAGE_TYPE_CLEANUP(ast_mwi_vm_app_type);
- ao2_cleanup(mwi_topic_pool);
- mwi_topic_pool = NULL;
}
int app_init(void)