diff options
author | Micael Karlberg <[email protected]> | 2019-05-07 14:59:22 +0200 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2019-05-22 18:21:02 +0200 |
commit | 3f490bea2e21871f534cdcd49d85314eb35f0164 (patch) | |
tree | edcf27f43e6589e1681736baf16d4c9b4c334b9c /lib/snmp/src/manager | |
parent | 6d955c8377f4df9c215424349050b38b8c7628b4 (diff) | |
download | otp-3f490bea2e21871f534cdcd49d85314eb35f0164.tar.gz otp-3f490bea2e21871f534cdcd49d85314eb35f0164.tar.bz2 otp-3f490bea2e21871f534cdcd49d85314eb35f0164.zip |
[snmp] Replaced usage of random with rand
Use of the deprecated module random has been replaced
by the module rand.
OTP-15331
Diffstat (limited to 'lib/snmp/src/manager')
-rw-r--r-- | lib/snmp/src/manager/snmpm_mpd.erl | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/snmp/src/manager/snmpm_mpd.erl b/lib/snmp/src/manager/snmpm_mpd.erl index 191dc2c281..8d0a7918a6 100644 --- a/lib/snmp/src/manager/snmpm_mpd.erl +++ b/lib/snmp/src/manager/snmpm_mpd.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2004-2015. All Rights Reserved. +%% Copyright Ericsson AB 2004-2019. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -68,11 +68,13 @@ %%%----------------------------------------------------------------- init(Vsns) -> ?vdebug("init -> entry with ~p", [Vsns]), - random:seed(erlang:phash2([node()]), - erlang:monotonic_time(), - erlang:unique_integer()), - snmpm_config:cre_counter(msg_id, random:uniform(2147483647)), - snmpm_config:cre_counter(req_id, random:uniform(2147483647)), + ?SNMP_RAND_SEED(), + %% rand:seed(exrop, + %% {erlang:phash2([node()]), + %% erlang:monotonic_time(), + %% erlang:unique_integer()}), + snmpm_config:cre_counter(msg_id, rand:uniform(2147483647)), + snmpm_config:cre_counter(req_id, rand:uniform(2147483647)), init_counters(), State = init_versions(Vsns, #state{}), init_usm(State#state.v3), |