mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-16 01:36:48 +00:00
Bug 6873 - Finish moving from the non-threadsafe (and poor randomness) rand() to threadsafe ast_random()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17627 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -208,7 +208,7 @@ static int ast_moh_files_next(struct ast_channel *chan)
|
||||
}
|
||||
|
||||
if (ast_test_flag(state->class, MOH_RANDOMIZE))
|
||||
state->pos = rand();
|
||||
state->pos = ast_random();
|
||||
|
||||
/* check to see if this file's format can be opened */
|
||||
if (ast_fileexists(state->class->filearray[state->pos], NULL, NULL) != -1)
|
||||
|
Reference in New Issue
Block a user