diff options
author | Micael Karlberg <[email protected]> | 2013-05-22 14:06:37 +0200 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2013-05-22 14:06:37 +0200 |
commit | fabfc0acd2a95178b88ce2d72714c6f8ada36558 (patch) | |
tree | b0ccc0a3d8579a5b1e50279b2c93a590ceff59a6 | |
parent | ba93ba22b3f7092a1a4ea3c10bae1e591162ba21 (diff) | |
download | otp-fabfc0acd2a95178b88ce2d72714c6f8ada36558.tar.gz otp-fabfc0acd2a95178b88ce2d72714c6f8ada36558.tar.bz2 otp-fabfc0acd2a95178b88ce2d72714c6f8ada36558.zip |
[snmp/agent] Mib server assumes no default value for mib_storage
-rw-r--r-- | lib/snmp/src/agent/snmpa_mib.erl | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/snmp/src/agent/snmpa_mib.erl b/lib/snmp/src/agent/snmpa_mib.erl index 1bd7398a69..031309b990 100644 --- a/lib/snmp/src/agent/snmpa_mib.erl +++ b/lib/snmp/src/agent/snmpa_mib.erl @@ -257,7 +257,7 @@ init([Prio, Mibs, Opts]) -> do_init(Prio, Mibs, Opts) -> process_flag(priority, Prio), process_flag(trap_exit, true), - put(sname,ms), + put(sname, ms), put(verbosity, ?vvalidate(get_verbosity(Opts))), ?vlog("starting",[]), @@ -291,8 +291,12 @@ do_init(Prio, Mibs, Opts) -> TeOverride = get_te_override(Opts), MibStorage = get_mib_storage(Opts), MibDataMod = get_data_mod(Opts), + ?vtrace("init -> try create mib data with" + "~n MeOverride: ~p" + "~n TeOverride: ~p" + "~n MibStorage: ~p", [MeOverride, TeOverride, MibStorage]), Data = MibDataMod:new(MibStorage), - ?vtrace("init -> mib data created",[]), + ?vdebug("init -> mib data created", []), case (catch mib_operations(MibDataMod, load_mib, Mibs, Data, MeOverride, TeOverride, true)) of @@ -704,7 +708,7 @@ get_te_override(Options) -> get_opt(trapentry_override, Options, false). get_mib_storage(Options) -> - get_opt(mib_storage, Options, ets). + get_opt(mib_storage, Options). get_data_mod(Options) -> get_opt(data_module, Options, snmpa_mib_data_tttn). @@ -894,6 +898,9 @@ timestamp() -> %% ---------------------------------------------------------------- +get_opt(Key, Options) -> + snmp_misc:get_option(Key, Options). + get_opt(Key, Options, Default) -> snmp_misc:get_option(Key, Options, Default). |