[asterisk-commits] qwell: branch 1.6.0 r115420 - in /branches/1.6.0: ./ res/res_musiconhold.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue May 6 14:39:12 CDT 2008


Author: qwell
Date: Tue May  6 14:39:11 2008
New Revision: 115420

URL: http://svn.digium.com/view/asterisk?view=rev&rev=115420
Log:
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)

........

................

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

Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.0/res/res_musiconhold.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/res/res_musiconhold.c?view=diff&rev=115420&r1=115419&r2=115420
==============================================================================
--- branches/1.6.0/res/res_musiconhold.c (original)
+++ branches/1.6.0/res/res_musiconhold.c Tue May  6 14:39:11 2008
@@ -256,7 +256,7 @@
 	} 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;
 		}




More information about the asterisk-commits mailing list