mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-29 18:19:30 +00:00
Tue Mar 4 07:00:01 CET 2003
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user