From: Automerge script Date: Sat, 3 Jun 2006 18:05:16 +0000 (+0000) Subject: automerge commit X-Git-Tag: 1.2.9.1-netsec~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6558487720fe38332935f693950b287598777e7;p=thirdparty%2Fasterisk.git automerge commit git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@31807 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c index 8f4ef33d2a..faa823e108 100644 --- a/res/res_musiconhold.c +++ b/res/res_musiconhold.c @@ -212,6 +212,8 @@ static int ast_moh_files_next(struct ast_channel *chan) if (ast_test_flag(state->class, MOH_RANDOMIZE)) state->pos = rand(); + state->pos %= state->class->total_files; + /* check to see if this file's format can be opened */ if (ast_fileexists(state->class->filearray[state->pos], NULL, NULL) != -1) break;