diff options
author | Anders Svensson <[email protected]> | 2016-06-12 09:09:59 +0200 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2016-06-12 09:09:59 +0200 |
commit | c2861de76ca39217a0cf4fc284f8eeaf3f7d2477 (patch) | |
tree | b55bae61e0d47b5ec76daf9207dadd5d3fe374b9 /lib/diameter/src/base/diameter_session.erl | |
parent | bddd9a9dd2f784eb570795b0f8ecd25d7ed93378 (diff) | |
parent | c980e489d02417e1144d28958fe9abd4017f72a4 (diff) | |
download | otp-c2861de76ca39217a0cf4fc284f8eeaf3f7d2477.tar.gz otp-c2861de76ca39217a0cf4fc284f8eeaf3f7d2477.tar.bz2 otp-c2861de76ca39217a0cf4fc284f8eeaf3f7d2477.zip |
Merge branch 'anders/diameter/rand/OTP-13664'
* anders/diameter/rand/OTP-13664:
Use rand(3) instead of random(3)
Diffstat (limited to 'lib/diameter/src/base/diameter_session.erl')
-rw-r--r-- | lib/diameter/src/base/diameter_session.erl | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/diameter/src/base/diameter_session.erl b/lib/diameter/src/base/diameter_session.erl index 53973649fd..d854bc36a5 100644 --- a/lib/diameter/src/base/diameter_session.erl +++ b/lib/diameter/src/base/diameter_session.erl @@ -158,10 +158,9 @@ session_id(Host) -> %% --------------------------------------------------------------------------- init() -> - {Now, Seed} = diameter_lib:seed(), - random:seed(Seed), + Now = diameter_lib:timestamp(), Time = time32(Now), - Seq = (?INT32 band (Time bsl 20)) bor (random:uniform(1 bsl 20) - 1), + Seq = (?INT32 band (Time bsl 20)) bor (rand:uniform(1 bsl 20) - 1), ets:insert(diameter_sequence, [{origin_state_id, Time}, {session_base, Time bsl 32}, {sequence, Seq}]), |