[asterisk-commits] bbryant: trunk r285641 - in /trunk: ./ res/res_musiconhold.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Sep 9 12:25:28 CDT 2010


Author: bbryant
Date: Thu Sep  9 12:25:24 2010
New Revision: 285641

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=285641
Log:
Merged revisions 285640 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r285640 | bbryant | 2010-09-09 13:23:28 -0400 (Thu, 09 Sep 2010) | 21 lines
  
  Merged revisions 285639 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r285639 | bbryant | 2010-09-09 13:22:25 -0400 (Thu, 09 Sep 2010) | 14 lines
    
    Merged revisions 285638 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r285638 | bbryant | 2010-09-09 13:20:17 -0400 (Thu, 09 Sep 2010) | 7 lines
      
      Fixes an issue with MOH where it doesn't recover cleanly when it can't play a file and would just stop, instead of continuing to find the next playable file in the MOH class.
      
      (closes issue #17807)
      Reported by: kshumard
      
      Review: https://reviewboard.asterisk.org/r/910/
    ........
  ................
................

Modified:
    trunk/   (props changed)
    trunk/res/res_musiconhold.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: trunk/res/res_musiconhold.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_musiconhold.c?view=diff&rev=285641&r1=285640&r2=285641
==============================================================================
--- trunk/res/res_musiconhold.c (original)
+++ trunk/res/res_musiconhold.c Thu Sep  9 12:25:24 2010
@@ -318,10 +318,17 @@
 		state->samples = 0;
 	}
 
-	if (!ast_openstream_full(chan, state->class->filearray[state->pos], chan->language, 1)) {
+	for (tries = 0; tries < state->class->total_files; ++tries) {
+		if (ast_openstream_full(chan, state->class->filearray[state->pos], chan->language, 1)) {
+			break;
+		}
+
 		ast_log(LOG_WARNING, "Unable to open file '%s': %s\n", state->class->filearray[state->pos], strerror(errno));
 		state->pos++;
 		state->pos %= state->class->total_files;
+	}
+
+	if (tries == state->class->total_files) {
 		return -1;
 	}
 




More information about the asterisk-commits mailing list