diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-04-05 17:44:44 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-04-05 17:44:44 +0000 |
commit | e0ba99b7f5b9f06dda7fe4baa8a7fb90e2ab40c8 (patch) | |
tree | 6334c0ffd529b865c510fbfb7a06b71e2c6d6ceb /pbx/pbx_dundi.c | |
parent | 54a140d030be645458cc82416501f0386e1d9e4b (diff) |
Bug 6873 - Finish moving from the non-threadsafe (and poor randomness) rand() to threadsafe ast_random()
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17627 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx/pbx_dundi.c')
-rw-r--r-- | pbx/pbx_dundi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c index e81753213..4397d4358 100644 --- a/pbx/pbx_dundi.c +++ b/pbx/pbx_dundi.c @@ -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 { |