]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
automerge commit
authorAutomerge script <automerge@asterisk.org>
Sat, 3 Jun 2006 18:05:16 +0000 (18:05 +0000)
committerAutomerge script <automerge@asterisk.org>
Sat, 3 Jun 2006 18:05:16 +0000 (18:05 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@31807 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_musiconhold.c

index 8f4ef33d2ad12399fd5087e623a36f5c8ea5f242..faa823e1081d221ca8ae5b4431471f9ea2892d3f 100644 (file)
@@ -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;