position, instead of always starting at the first file, and doing the random
operation only when switching to the next file.
(bug reported by John Lange on the asterisk-dev mailing list)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47238
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
/* initialize */
memset(state, 0, sizeof(struct moh_files_state));
state->class = class;
+ if (ast_test_flag(state->class, MOH_RANDOMIZE))
+ state->pos = rand() % class->total_files;
}
state->origwfmt = chan->writeformat;