static int extenpatternmatchnew_config = 0;
static char *overrideswitch_config = NULL;
+static struct stasis_subscription *fully_booted_subscription;
+
AST_MUTEX_DEFINE_STATIC(save_dialplan_lock);
AST_MUTEX_DEFINE_STATIC(reload_lock);
ast_manager_unregister(AMI_EXTENSION_REMOVE);
ast_context_destroy(NULL, registrar);
+ stasis_unsubscribe_and_join(fully_booted_subscription);
+
return 0;
}
ast_log(LOG_WARNING, "users.conf is deprecated and will be removed in a future version of Asterisk\n");
- stasis_unsubscribe(sub);
+ fully_booted_subscription = stasis_unsubscribe(fully_booted_subscription);
}
static void pbx_load_users(void)
return;
/*! \todo Remove users.conf support in Asterisk 23 */
- stasis_subscribe_pool(ast_manager_get_topic(), startup_event_cb, NULL);
+ fully_booted_subscription =
+ stasis_subscribe_pool(ast_manager_get_topic(), startup_event_cb, NULL);
for (cat = ast_category_browse(cfg, NULL); cat ; cat = ast_category_browse(cfg, cat)) {
if (!strcasecmp(cat, "general"))