[asterisk-commits] russell: branch 1.4 r47239 - in /branches/1.4: ./ res/res_musiconhold.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Nov 6 18:25:11 MST 2006


Author: russell
Date: Mon Nov  6 19:25:10 2006
New Revision: 47239

URL: http://svn.digium.com/view/asterisk?rev=47239&view=rev
Log:
Merged revisions 47238 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r47238 | russell | 2006-11-06 20:22:58 -0500 (Mon, 06 Nov 2006) | 5 lines

If random order is enabled for files mode music on hold, set a random initial
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)

........

Modified:
    branches/1.4/   (props changed)
    branches/1.4/res/res_musiconhold.c

Propchange: branches/1.4/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Modified: branches/1.4/res/res_musiconhold.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/res/res_musiconhold.c?rev=47239&r1=47238&r2=47239&view=diff
==============================================================================
--- branches/1.4/res/res_musiconhold.c (original)
+++ branches/1.4/res/res_musiconhold.c Mon Nov  6 19:25:10 2006
@@ -311,6 +311,8 @@
 			/* initialize */
 			memset(state, 0, sizeof(*state));
 			state->class = class;
+			if (ast_test_flag(state->class, MOH_RANDOMIZE))
+				state->pos = ast_random() % class->total_files;
 		}
 
 		state->origwfmt = chan->writeformat;



More information about the asterisk-commits mailing list