aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-05-06 19:39:11 +0000
committerqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-05-06 19:39:11 +0000
commitef7c7b601ecffb25bbcc015b2feccd34fb68dd4c (patch)
tree2a1bc89ff662c798fd270b064805808ed2d3c66d /res
parentfb5fd75837c04078fad0e67c07c975dc5ce045d3 (diff)
Merged revisions 115419 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r115419 | qwell | 2008-05-06 14:38:44 -0500 (Tue, 06 May 2008) | 15 lines Merged revisions 115418 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r115418 | qwell | 2008-05-06 14:34:58 -0500 (Tue, 06 May 2008) | 7 lines Switch to using ast_random() rather than just rand(). This does not fix the bug reported, but I believe it is correct. (from issue #12446) Patches: bug_12446.diff uploaded by snuffy (license 35) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@115420 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r--res/res_musiconhold.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c
index 64c9e71e9..f24d3ed27 100644
--- a/res/res_musiconhold.c
+++ b/res/res_musiconhold.c
@@ -256,7 +256,7 @@ static int ast_moh_files_next(struct ast_channel *chan)
} else if (ast_test_flag(state->class, MOH_RANDOMIZE)) {
/* Get a random file and ensure we can open it */
for (tries = 0; tries < 20; tries++) {
- state->pos = rand() % state->class->total_files;
+ state->pos = ast_random() % state->class->total_files;
if (ast_fileexists(state->class->filearray[state->pos], NULL, NULL) > 0)
break;
}