aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorroot <root@f38db490-d61c-443f-a65b-d21fe96a405b>2006-06-03 18:05:16 +0000
committerroot <root@f38db490-d61c-443f-a65b-d21fe96a405b>2006-06-03 18:05:16 +0000
commitca96414a740476e12c4e1cddb21294a7ea8d8634 (patch)
tree60f7150fbf060f1806de4c6c5ab769ba0936fa0a /res
parente82d7f519a6a1ec5df289bb3e9b7820910dfaec6 (diff)
automerge commit
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@31807 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r--res/res_musiconhold.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c
index 8f4ef33d2..faa823e10 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;