mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-18 18:46:16 +00:00
Bug 6873 - Finish moving from the non-threadsafe (and poor randomness) rand() to threadsafe ast_random()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17627 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -440,7 +440,7 @@ static void reset_global_eid(void)
|
||||
static int get_trans_id(void)
|
||||
{
|
||||
struct dundi_transaction *t;
|
||||
int stid = (rand() % 32766) + 1;
|
||||
int stid = (ast_random() % 32766) + 1;
|
||||
int tid = stid;
|
||||
do {
|
||||
t = alltrans;
|
||||
@@ -493,7 +493,7 @@ static void build_iv(unsigned char *iv)
|
||||
int x;
|
||||
fluffy = (unsigned int *)(iv);
|
||||
for (x=0;x<4;x++)
|
||||
fluffy[x] = rand();
|
||||
fluffy[x] = ast_random();
|
||||
}
|
||||
|
||||
struct dundi_query_state {
|
||||
|
Reference in New Issue
Block a user