[asterisk-commits] file: branch 1.4 r181655 - /branches/1.4/res/res_musiconhold.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Mar 12 11:29:23 CDT 2009


Author: file
Date: Thu Mar 12 11:29:19 2009
New Revision: 181655

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=181655
Log:
Fix issue with streaming MOH failing if nobody is listening.

When a music class is setup to actually provide music on hold
from a stream we need to constantly read audio from it since it
will constantly be providing audio. This is now done despite there
being no channels listening to it.

(closes issue #14416)
Reported by: caspy

Modified:
    branches/1.4/res/res_musiconhold.c

Modified: branches/1.4/res/res_musiconhold.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.4/res/res_musiconhold.c?view=diff&rev=181655&r1=181654&r2=181655
==============================================================================
--- branches/1.4/res/res_musiconhold.c (original)
+++ branches/1.4/res/res_musiconhold.c Thu Mar 12 11:29:19 2009
@@ -557,11 +557,11 @@
 			}
 			res = 8 * MOH_MS_INTERVAL;	/* 8 samples per millisecond */
 		}
-		if (AST_LIST_EMPTY(&class->members))
+		if (strncasecmp(class->dir, "http://", 7) && AST_LIST_EMPTY(&class->members))
 			continue;
 		/* Read mp3 audio */
 		len = ast_codec_get_len(class->format, res);
-		
+
 		if ((res2 = read(class->srcfd, sbuf, len)) != len) {
 			if (!res2) {
 				close(class->srcfd);




More information about the asterisk-commits mailing list