diff options
author | Colton <[email protected]> | 2014-04-11 07:56:41 -0500 |
---|---|---|
committer | Colton <[email protected]> | 2014-04-15 10:04:46 -0500 |
commit | eadc39c5356692d8a093b835d884c8e11faf4c73 (patch) | |
tree | 84f99b54e830ae1d6d405e3b3ffaba8adfe9d30d /lib/snmp/test | |
parent | 8acc644e162bad52f7ab81c76c0cad15628e4f3d (diff) | |
download | otp-eadc39c5356692d8a093b835d884c8e11faf4c73.tar.gz otp-eadc39c5356692d8a093b835d884c8e11faf4c73.tar.bz2 otp-eadc39c5356692d8a093b835d884c8e11faf4c73.zip |
Fix badmatch error when trying to start_link an snmp_test_manager
Was previously unable to start_link an snmp_test_manager due to a
badmatch occurring on line 133. See traceback here:
http://pastebin.com/1eNYkGTz Edit snmp_test_manager.erl to only expect
the atom ok when it was in turn start_linking an snmpm server. Also remove reference
to no longer existing Pid variable. Lastly remove the mgr key from the
State record, as after these changes it was no longer being used.
Diffstat (limited to 'lib/snmp/test')
-rw-r--r-- | lib/snmp/test/snmp_test_manager.erl | 6 |
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) -> |