aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_musiconhold.c
diff options
context:
space:
mode:
Diffstat (limited to 'res/res_musiconhold.c')
-rwxr-xr-xres/res_musiconhold.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c
index ac6c0d54d..6ba33b3ca 100755
--- a/res/res_musiconhold.c
+++ b/res/res_musiconhold.c
@@ -169,10 +169,9 @@ static int ast_moh_files_next(struct ast_channel *chan)
state->pos++;
}
- if (ast_test_flag(state->class, MOH_RANDOMIZE)) {
- srand(time(NULL)+getpid()+strlen(chan->name)-state->class->total_files);
+ if (ast_test_flag(state->class, MOH_RANDOMIZE))
state->pos = rand();
- }
+
/* check to see if this file's format can be opened */
if (ast_fileexists(state->class->filearray[state->pos], NULL, NULL) != -1)
break;