aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/test/snmp_test_manager.erl
diff options
context:
space:
mode:
authorHenrik Nord <[email protected]>2014-06-11 10:53:00 +0200
committerHenrik Nord <[email protected]>2014-06-11 10:53:00 +0200
commit93b00b52194febe89beb09b137d44d424ed21f11 (patch)
treec57b95c184304ebbee738b59d52359a537d21230 /lib/snmp/test/snmp_test_manager.erl
parent0bbe935474b3548a80925423ad625be842d00479 (diff)
parentf918901bded2ab5bd0884a20ba6fa67f773cf520 (diff)
downloadotp-93b00b52194febe89beb09b137d44d424ed21f11.tar.gz
otp-93b00b52194febe89beb09b137d44d424ed21f11.tar.bz2
otp-93b00b52194febe89beb09b137d44d424ed21f11.zip
Merge branch 'telsacolton/snmp_test_manager_badmatch_pid' into maint
* telsacolton/snmp_test_manager_badmatch_pid: Fix badmatch error when trying to start_link an snmp_test_manager Edit line 59 to remove "mgr" key from #State record. Edit line 133 to expect ok instead of {ok, Pid} from snmpm:start_link . Edit line 136 not to reference Pid variable which was removed above.
Diffstat (limited to 'lib/snmp/test/snmp_test_manager.erl')
-rw-r--r--lib/snmp/test/snmp_test_manager.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/snmp/test/snmp_test_manager.erl b/lib/snmp/test/snmp_test_manager.erl
index 925ae77ab5..6d8673eecd 100644
--- a/lib/snmp/test/snmp_test_manager.erl
+++ b/lib/snmp/test/snmp_test_manager.erl
@@ -56,7 +56,7 @@
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
code_change/3, terminate/2]).
--record(state, {mgr, parent, req, agent_target_name}).
+-record(state, {parent, req, agent_target_name}).
-define(SERVER, ?MODULE).
-define(USER, ?MODULE).
@@ -130,10 +130,10 @@ init([Parent, Opts]) ->
do_init(Opts) ->
{MgrDir, MgrConf, MgrOpts, AgentTargetName, AgentConf} = parse_opts(Opts),
ok = snmp_config:write_manager_config(MgrDir, "", MgrConf),
- {ok, Pid} = snmpm:start_link(MgrOpts),
+ ok = snmpm:start_link(MgrOpts),
ok = snmpm:register_user(?USER, ?MODULE, self()),
ok = snmpm:register_agent(?USER, AgentTargetName, AgentConf),
- {ok, #state{mgr = Pid, agent_target_name = AgentTargetName}}.
+ {ok, #state{agent_target_name = AgentTargetName}}.
parse_opts(Opts) ->