diff options
author | Anders Svensson <[email protected]> | 2016-06-11 12:42:43 +0200 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2016-06-11 18:49:42 +0200 |
commit | c980e489d02417e1144d28958fe9abd4017f72a4 (patch) | |
tree | 0074bd849cc83e3f471cb0b89feae2d611ce6bc4 /lib/diameter/src/base/diameter_session.erl | |
parent | f027ac4d0f1d522e3b3d5c4695baf42a5cdd5330 (diff) | |
download | otp-c980e489d02417e1144d28958fe9abd4017f72a4.tar.gz otp-c980e489d02417e1144d28958fe9abd4017f72a4.tar.bz2 otp-c980e489d02417e1144d28958fe9abd4017f72a4.zip |
Use rand(3) instead of random(3)
The latter is deprecated in OTP 19.
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}]), |