aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/src/agent/snmpa_mpd.erl
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2019-05-22 18:36:17 +0200
committerMicael Karlberg <[email protected]>2019-05-22 18:36:17 +0200
commit5f1699c81d82e67b561c2759b0220b71a6a8ba80 (patch)
treefb313a69a654d39158bfc9012511682d0ad5c34f /lib/snmp/src/agent/snmpa_mpd.erl
parenta66ebde07b7c7e85dd4fa843f1bc9bacc5e452a6 (diff)
parent3f490bea2e21871f534cdcd49d85314eb35f0164 (diff)
downloadotp-5f1699c81d82e67b561c2759b0220b71a6a8ba80.tar.gz
otp-5f1699c81d82e67b561c2759b0220b71a6a8ba80.tar.bz2
otp-5f1699c81d82e67b561c2759b0220b71a6a8ba80.zip
Merge branch 'bmk/snmp/20190522/random_to_rand/OTP-15331' into maint
Diffstat (limited to 'lib/snmp/src/agent/snmpa_mpd.erl')
-rw-r--r--lib/snmp/src/agent/snmpa_mpd.erl10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/snmp/src/agent/snmpa_mpd.erl b/lib/snmp/src/agent/snmpa_mpd.erl
index b440d57d03..2ec5dcb5e6 100644
--- a/lib/snmp/src/agent/snmpa_mpd.erl
+++ b/lib/snmp/src/agent/snmpa_mpd.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2015. All Rights Reserved.
+%% Copyright Ericsson AB 1997-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.
@@ -76,11 +76,9 @@
init(Vsns) ->
?vlog("init -> entry with"
"~n Vsns: ~p", [Vsns]),
- random:seed(erlang:phash2([node()]),
- erlang:monotonic_time(),
- erlang:unique_integer()),
- ets:insert(snmp_agent_table, {msg_id, random:uniform(2147483647)}),
- ets:insert(snmp_agent_table, {req_id, random:uniform(2147483647)}),
+ ?SNMP_RAND_SEED(),
+ ets:insert(snmp_agent_table, {msg_id, rand:uniform(2147483647)}),
+ ets:insert(snmp_agent_table, {req_id, rand:uniform(2147483647)}),
init_counters(),
init_versions(Vsns, #state{}).