diff options
author | Matteo Brancaleoni <mbrancaleoni@espia.it> | 2003-03-04 06:00:19 +0000 |
---|---|---|
committer | Matteo Brancaleoni <mbrancaleoni@espia.it> | 2003-03-04 06:00:19 +0000 |
commit | ce58e5862d32dcb5964716f8244ded00898f3d42 (patch) | |
tree | a3cf1e0cb0fa8eefa5779698cef6b7f9329bd52e /res/res_musiconhold.c | |
parent | 3f860700280a0e733d12252f97fe6e14e4094a53 (diff) |
Tue Mar 4 07:00:01 CET 2003
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_musiconhold.c')
-rwxr-xr-x | res/res_musiconhold.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c index 127047186..0d540aebd 100755 --- a/res/res_musiconhold.c +++ b/res/res_musiconhold.c @@ -531,11 +531,27 @@ static void load_moh_classes(void) } } +void ast_moh_destroy(void) +{ + struct mohclass *moh; + ast_pthread_mutex_lock(&moh_lock); + moh = mohclasses; + while(moh) { + if (moh->pid) { + kill(moh->pid, SIGKILL); + moh->pid = 0; + } + moh = moh->next; + } + ast_pthread_mutex_unlock(&moh_lock); +} + int load_module(void) { int res; load_moh_classes(); res = ast_register_application(app0, moh0_exec, synopsis0, descrip0); + atexit(ast_moh_destroy); if (!res) res = ast_register_application(app1, moh1_exec, synopsis1, descrip1); if (!res) |