Merged revisions 184726 via svnmerge from

https://origsvn.digium.com/svn/asterisk/trunk

........
r184726 | russell | 2009-03-27 13:04:43 -0500 (Fri, 27 Mar 2009) | 2 lines

Use ast_random() instead of rand() to ensure we use the best RNG available.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@184728 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2009-03-27 18:09:49 +00:00
parent de17404c12
commit ec2800dac7
2 changed files with 3 additions and 3 deletions

View File

@@ -3791,7 +3791,7 @@ static struct ast_str *generic_http_callback(enum output_format format,
* properties of the rand() function (and the constantcy of s), that
* won't happen twice in a row.
*/
while ((session->managerid = rand() ^ (unsigned long) session) == 0);
while ((session->managerid = ast_random() ^ (unsigned long) session) == 0);
session->last_ev = grab_last();
AST_LIST_HEAD_INIT_NOLOCK(&session->datastores);
AST_LIST_LOCK(&sessions);