summaryrefslogtreecommitdiff
path: root/main/loader.c
diff options
context:
space:
mode:
authorDavid M. Lee <dlee@digium.com>2013-05-10 17:12:57 +0000
committerDavid M. Lee <dlee@digium.com>2013-05-10 17:12:57 +0000
commit4666079b05ea3b189e4fdccc665f7a61bf3e5535 (patch)
tree826e54b6a78671d7e911cbff4799b31b0aed9a30 /main/loader.c
parentdb925c3f066fc73849af06bcfc966467af349891 (diff)
Address unload order issues for res_stasis* modules
I've noticed when doing a graceful shutdown that the res_stasis_http.so module gets unloaded before the modules that use it, which causes some asserts during their unload. While r386928 was a quick hack to get it to not assert and die, this patch increases the use counts on res_stasis.so and res_stasis_http.so properly. It's a bigger change than I expected, hence the review instead of just committing it. Review: https://reviewboard.asterisk.org/r/2489/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@388350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/loader.c')
-rw-r--r--main/loader.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/main/loader.c b/main/loader.c
index cf53eda99..3bcf37ca9 100644
--- a/main/loader.c
+++ b/main/loader.c
@@ -525,6 +525,7 @@ void ast_module_shutdown(void)
}
AST_LIST_REMOVE_CURRENT(entry);
if (mod->flags.running && !mod->flags.declined && mod->info->unload) {
+ ast_verb(1, "Unloading %s\n", mod->resource);
mod->info->unload();
}
AST_LIST_HEAD_DESTROY(&mod->users);
@@ -571,6 +572,7 @@ int ast_unload_resource(const char *resource_name, enum ast_module_unload_mode f
/* Request any channels attached to the module to hangup. */
__ast_module_user_hangup_all(mod);
+ ast_verb(1, "Unloading %s\n", mod->resource);
res = mod->info->unload();
if (res) {
ast_log(LOG_WARNING, "Firm unload failed for %s\n", resource_name);