From: Russell Bryant Date: Thu, 7 Dec 2006 18:21:21 +0000 (+0000) Subject: Merged revisions 48357 via svnmerge from X-Git-Tag: 1.6.0-beta1~3^2~3766 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d24a78944d128012296f640e4a8a36f58cf32535;p=thirdparty%2Fasterisk.git Merged revisions 48357 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r48357 | russell | 2006-12-07 13:17:28 -0500 (Thu, 07 Dec 2006) | 11 lines Merged revisions 48356 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r48356 | russell | 2006-12-07 13:14:13 -0500 (Thu, 07 Dec 2006) | 3 lines Ensure that the file position is not incremented beyond the total number of files available for playback. (issue #8539, ulogic) ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48358 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c index 2085cc4f9b..f560432bb5 100644 --- a/res/res_musiconhold.c +++ b/res/res_musiconhold.c @@ -242,6 +242,7 @@ static int ast_moh_files_next(struct ast_channel *chan) if (!ast_openstream_full(chan, state->class->filearray[state->pos], chan->language, 1)) { 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; return -1; }