diff options
author | Erland Schönbeck <[email protected]> | 2015-04-28 13:32:55 +0200 |
---|---|---|
committer | Erland Schönbeck <[email protected]> | 2015-04-28 13:32:55 +0200 |
commit | 22173c2e4d65e47039975b91015560ae4256b3c1 (patch) | |
tree | 807470de259e85483b79b40e6e8f85c89608b982 /lib/snmp/src/agent/snmp_target_mib.erl | |
parent | 861145a503c77d8144033f38d288bdda31699edd (diff) | |
parent | 722357d7a23ee4a47277f05aa5fd593bc4de0db0 (diff) | |
download | otp-22173c2e4d65e47039975b91015560ae4256b3c1.tar.gz otp-22173c2e4d65e47039975b91015560ae4256b3c1.tar.bz2 otp-22173c2e4d65e47039975b91015560ae4256b3c1.zip |
Merge branch 'erland/OTP18/snmp/OTP-12452'
* erland/OTP18/snmp/OTP-12452:
snmp: Remove deprecated warning for erlang:now in snmp_verbority
snmp: Change to random use crypto. Remove use of erlang:now
Diffstat (limited to 'lib/snmp/src/agent/snmp_target_mib.erl')
-rw-r--r-- | lib/snmp/src/agent/snmp_target_mib.erl | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/lib/snmp/src/agent/snmp_target_mib.erl b/lib/snmp/src/agent/snmp_target_mib.erl index ef9503cda8..f66c54849f 100644 --- a/lib/snmp/src/agent/snmp_target_mib.erl +++ b/lib/snmp/src/agent/snmp_target_mib.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1998-2014. All Rights Reserved. +%% Copyright Ericsson AB 1998-2015. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -346,13 +346,6 @@ check_target_params(X) -> error({invalid_target_params, X}). - -%% maybe_create_table(Name) -> -%% case snmpa_local_db:table_exists(db(Name)) of -%% true -> ok; -%% _ -> snmpa_local_db:table_create(db(Name)) -%% end. - init_tabs(Addrs, Params) -> ?vdebug("create target address table",[]), AddrDB = db(snmpTargetAddrTable), @@ -679,8 +672,9 @@ snmpTargetSpinLock(print) -> snmpTargetSpinLock(new) -> snmp_generic:variable_func(new, {snmpTargetSpinLock, volatile}), - {A1,A2,A3} = erlang:now(), - random:seed(A1,A2,A3), + random:seed(erlang:phash2([node()]), + erlang:monotonic_time(), + erlang:unique_integer()), Val = random:uniform(2147483648) - 1, snmp_generic:variable_func(set, Val, {snmpTargetSpinLock, volatile}); @@ -1080,5 +1074,3 @@ error(Reason) -> config_err(F, A) -> snmpa_error:config_err("[TARGET-MIB]: " ++ F, A). - - |