[asterisk-commits] jpeeler: branch 1.6.1 r162896 - in /branches/1.6.1: ./ res/res_musiconhold.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Dec 10 16:12:57 CST 2008
Author: jpeeler
Date: Wed Dec 10 16:12:57 2008
New Revision: 162896
URL: http://svn.digium.com/view/asterisk?view=rev&rev=162896
Log:
Merged revisions 162891 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r162891 | jpeeler | 2008-12-10 16:11:46 -0600 (Wed, 10 Dec 2008) | 13 lines
Merged revisions 162874 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r162874 | jpeeler | 2008-12-10 16:04:18 -0600 (Wed, 10 Dec 2008) | 5 lines
(closes issue #13229)
Reported by: clegall_proformatique
Ensure that moh_generate does not return prematurely before local_ast_moh_stop is called. Also, the sleep in mp3_spawn now only occurs for http locations since it seems to have been added originally only for failing media streams.
........
................
Modified:
branches/1.6.1/ (props changed)
branches/1.6.1/res/res_musiconhold.c
Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.1/res/res_musiconhold.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/res/res_musiconhold.c?view=diff&rev=162896&r1=162895&r2=162896
==============================================================================
--- branches/1.6.1/res/res_musiconhold.c (original)
+++ branches/1.6.1/res/res_musiconhold.c Wed Dec 10 16:12:57 2008
@@ -413,7 +413,7 @@
files = 1;
} else {
dir = opendir(class->dir);
- if (!dir && !strstr(class->dir,"http://") && !strstr(class->dir,"HTTP://")) {
+ if (!dir && !strncasecmp(class->dir, "http://", 7)) {
ast_log(LOG_WARNING, "%s is not a valid directory\n", class->dir);
return -1;
}
@@ -456,8 +456,7 @@
}
}
-
- if (strstr(class->dir,"http://") || strstr(class->dir,"HTTP://")) {
+ if (!strncasecmp(class->dir, "http://", 7)) {
ast_copy_string(fns[files], class->dir, sizeof(fns[files]));
argv[argc++] = fns[files];
files++;
@@ -488,7 +487,7 @@
close(fds[1]);
return -1;
}
- if (time(NULL) - class->start < respawn_time) {
+ if (!strncasecmp(class->dir, "http://", 7) && time(NULL) - class->start < respawn_time) {
sleep(respawn_time - (time(NULL) - class->start));
}
@@ -839,8 +838,9 @@
short buf[1280 + AST_FRIENDLY_OFFSET / 2];
int res;
- if (!moh->parent->pid)
- return -1;
+ if (!moh->parent->pid && moh->parent->inuse == 0) {
+ return -1;
+ }
len = ast_codec_get_len(moh->parent->format, samples);
More information about the asterisk-commits
mailing list