aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-18 23:59:02 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-18 23:59:02 +0000
commit7fe747fbe1da22f2a8307aa66ad31135b5715533 (patch)
tree3acbc84a789da1299954cb3b5e7c974e50d88f3c
parent1be8f9fe8f285c8236ed3a639d0912739db6d5d7 (diff)
This change prevents a crash from occurring if res_musiconhold.so
is unloaded and then Asterisk is stopped. The problem was that we are not unregistering the ast_moh_destroy function at exit. (closes issue #13761) Reported by: eliel Patches: res_musiconhold.c.patch uploaded by eliel (license 64) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@157592 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--res/res_musiconhold.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c
index c90c6fd11..4507411ee 100644
--- a/res/res_musiconhold.c
+++ b/res/res_musiconhold.c
@@ -1672,6 +1672,7 @@ static int unload_module(void)
res |= ast_unregister_application(start_moh);
res |= ast_unregister_application(stop_moh);
ast_cli_unregister_multiple(cli_moh, sizeof(cli_moh) / sizeof(struct ast_cli_entry));
+ ast_unregister_atexit(ast_moh_destroy);
return res;
}