From 8bd83e6a805ee15c52e239e8d404e1d3e1021048 Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Wed, 3 Apr 2019 17:53:30 +0200 Subject: [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). --- lib/snmp/src/agent/snmpa_local_db.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/snmp/src/agent/snmpa_local_db.erl') 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]), -- cgit v1.2.3