aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/src/agent
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2019-04-03 17:53:30 +0200
committerMicael Karlberg <[email protected]>2019-04-11 18:55:44 +0200
commit8bd83e6a805ee15c52e239e8d404e1d3e1021048 (patch)
tree486f0275c4002496e4775e68c6815e5ca25f8c9b /lib/snmp/src/agent
parente7c9ded977218db7fa19c3fcc5169be08c4e7010 (diff)
downloadotp-8bd83e6a805ee15c52e239e8d404e1d3e1021048.tar.gz
otp-8bd83e6a805ee15c52e239e8d404e1d3e1021048.tar.bz2
otp-8bd83e6a805ee15c52e239e8d404e1d3e1021048.zip
[snmp|agent|test] Agent test manager start fix
The agent test manager had a bug during start that could potentially cause deadlock, but atleast could cause test cases to fail because of timeouts. The test manager (actually the "packet server") used proc_lib to start the process but it called the init_ack function before the init was actually complete. This was only a problem for v3 cases (where it did a bunch of further inits, including starting the local-db process). Also did debug/verbosity tweaking. Added a bunch of debug (verbosity) printouts for the agent test manager "packet server" during v3 init. Also made sure we could distinguish the "normal" local-db from the one used by the test manager (this is done by using a new short-name).
Diffstat (limited to 'lib/snmp/src/agent')
-rw-r--r--lib/snmp/src/agent/snmpa_local_db.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/snmp/src/agent/snmpa_local_db.erl b/lib/snmp/src/agent/snmpa_local_db.erl
index eb67b9cd6f..f481fe9970 100644
--- a/lib/snmp/src/agent/snmpa_local_db.erl
+++ b/lib/snmp/src/agent/snmpa_local_db.erl
@@ -147,8 +147,8 @@ init([Prio, DbDir, DbInitError, Opts]) ->
do_init(Prio, DbDir, DbInitError, Opts) ->
process_flag(priority, Prio),
process_flag(trap_exit, true),
- put(sname,ldb),
- put(verbosity,get_opt(verbosity, Opts, ?default_verbosity)),
+ put(sname, get_opt(sname, Opts, ldb)),
+ put(verbosity, get_opt(verbosity, Opts, ?default_verbosity)),
?vlog("starting",[]),
Dets = dets_open(DbDir, DbInitError, Opts),
Ets = ets:new(?ETS_TAB, [set, protected]),