[Asterisk-cvs] asterisk/res res_musiconhold.c,1.54,1.55
markster at lists.digium.com
markster at lists.digium.com
Fri Mar 4 21:23:51 CST 2005
Update of /usr/cvsroot/asterisk/res
In directory mongoose.digium.com:/tmp/cvs-serv23177/res
Modified Files:
res_musiconhold.c
Log Message:
Make mpg123 behave more nicely
Index: res_musiconhold.c
===================================================================
RCS file: /usr/cvsroot/asterisk/res/res_musiconhold.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- res_musiconhold.c 4 Mar 2005 06:47:24 -0000 1.54
+++ res_musiconhold.c 5 Mar 2005 03:20:55 -0000 1.55
@@ -945,11 +945,11 @@
while (moh) {
if (moh->pid) {
ast_log(LOG_DEBUG, "killing %d!\n", moh->pid);
- stime = time(NULL) + 5;
+ stime = time(NULL) + 2;
pid = moh->pid;
moh->pid = 0;
kill(pid, SIGKILL);
- while ((bytes = read(moh->srcfd, buff, 8192)) && time(NULL) < stime) {
+ while ((ast_wait_for_input(moh->srcfd, 100) > -1) && (bytes = read(moh->srcfd, buff, 8192)) && time(NULL) < stime) {
tbytes = tbytes + bytes;
}
ast_log(LOG_DEBUG, "mpg123 pid %d and child died after %d bytes read\n", pid, tbytes);
More information about the svn-commits
mailing list