mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-30 02:26:23 +00:00
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 ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104016 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -3427,7 +3427,7 @@ static struct ast_str *generic_http_callback(enum output_format format,
|
|||||||
ast_mutex_init(&s->__lock);
|
ast_mutex_init(&s->__lock);
|
||||||
ast_mutex_lock(&s->__lock);
|
ast_mutex_lock(&s->__lock);
|
||||||
s->inuse = 1;
|
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();
|
s->last_ev = grab_last();
|
||||||
AST_LIST_LOCK(&sessions);
|
AST_LIST_LOCK(&sessions);
|
||||||
AST_LIST_INSERT_HEAD(&sessions, s, list);
|
AST_LIST_INSERT_HEAD(&sessions, s, list);
|
||||||
|
Reference in New Issue
Block a user