aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/src/base/diameter_session.erl
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2016-06-12 09:09:59 +0200
committerAnders Svensson <[email protected]>2016-06-12 09:09:59 +0200
commitc2861de76ca39217a0cf4fc284f8eeaf3f7d2477 (patch)
treeb55bae61e0d47b5ec76daf9207dadd5d3fe374b9 /lib/diameter/src/base/diameter_session.erl
parentbddd9a9dd2f784eb570795b0f8ecd25d7ed93378 (diff)
parentc980e489d02417e1144d28958fe9abd4017f72a4 (diff)
downloadotp-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.erl5
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}]),