[asterisk-commits] kpfleming: trunk r104016 - in /trunk: ./ main/manager.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Feb 21 08:44:04 CST 2008
Author: kpfleming
Date: Thu Feb 21 08:44:04 2008
New Revision: 104016
URL: http://svn.digium.com/view/asterisk?view=rev&rev=104016
Log:
Merged revisions 104015 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r104015 | kpfleming | 2008-02-21 08:33:51 -0600 (Thu, 21 Feb 2008) | 2 lines
reduce the likelihood that HTTP Manager session ids will consist of primarily '1' bits
........
Modified:
trunk/ (props changed)
trunk/main/manager.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/main/manager.c
URL: http://svn.digium.com/view/asterisk/trunk/main/manager.c?view=diff&rev=104016&r1=104015&r2=104016
==============================================================================
--- trunk/main/manager.c (original)
+++ trunk/main/manager.c Thu Feb 21 08:44:04 2008
@@ -3427,7 +3427,7 @@
ast_mutex_init(&s->__lock);
ast_mutex_lock(&s->__lock);
s->inuse = 1;
- s->managerid = rand() | 1; /* make sure it is non-zero */
+ s->managerid = (rand() ^ (unsigned long) s) | 1; /* make sure it is non-zero */
s->last_ev = grab_last();
AST_LIST_LOCK(&sessions);
AST_LIST_INSERT_HEAD(&sessions, s, list);
More information about the asterisk-commits
mailing list