From 33ddb536631cb9b46dc63923dbf79ead8db89186 Mon Sep 17 00:00:00 2001 From: Matthew Fredrickson Date: Tue, 19 Sep 2006 21:07:49 +0000 Subject: Various updates from PCadach's chan_h323-live branch git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43294 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- res/res_musiconhold.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'res/res_musiconhold.c') 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; -- cgit v1.2.3