diff options
author | mattf <mattf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-09-19 21:07:49 +0000 |
---|---|---|
committer | mattf <mattf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-09-19 21:07:49 +0000 |
commit | b759835a90f073c926cd14c1ea0b1b65886c9172 (patch) | |
tree | cf83670bfa579bddec4a254d9f6fc45e2a8a7829 /res | |
parent | 46e384f88c5799ec199046c5bfc1b0957a7a5957 (diff) |
Various updates from PCadach's chan_h323-live branch
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43294 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r-- | res/res_musiconhold.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c index e553a994d..408201706 100644 --- a/res/res_musiconhold.c +++ b/res/res_musiconhold.c @@ -525,7 +525,7 @@ static void *monmp3thread(void *data) close(class->srcfd); class->srcfd = -1; pthread_testcancel(); - if (class->pid) { + if (class->pid > 1) { kill(class->pid, SIGHUP); usleep(100000); kill(class->pid, SIGTERM); @@ -778,6 +778,10 @@ static int moh_scan_files(struct mohclass *class) { if ((strlen(files_dirent->d_name) < 4)) continue; + /* Skip standard license file - it is not audio */ + if (!strcmp(files_dirent->d_name, "LICENSE")) + continue; + snprintf(filepath, sizeof(filepath), "%s/%s", class->dir, files_dirent->d_name); if (stat(filepath, &statbuf)) @@ -1095,7 +1099,7 @@ static void ast_moh_destroy(void) AST_LIST_LOCK(&mohclasses); while ((moh = AST_LIST_REMOVE_HEAD(&mohclasses, list))) { - if (moh->pid) { + if (moh->pid > 1) { ast_log(LOG_DEBUG, "killing %d!\n", moh->pid); stime = time(NULL) + 2; pid = moh->pid; |