diff options
author | Micael Karlberg <[email protected]> | 2013-05-22 14:00:16 +0200 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2013-05-22 14:00:16 +0200 |
commit | ba93ba22b3f7092a1a4ea3c10bae1e591162ba21 (patch) | |
tree | aa26a3964e768460e06b6d3103eb25f6760a2722 | |
parent | b90e858649c07e6e744a2adee95f6f2d22cb63f9 (diff) | |
download | otp-ba93ba22b3f7092a1a4ea3c10bae1e591162ba21.tar.gz otp-ba93ba22b3f7092a1a4ea3c10bae1e591162ba21.tar.bz2 otp-ba93ba22b3f7092a1a4ea3c10bae1e591162ba21.zip |
[snmp/agent] Add default value for mib_storage for sub-agent
When starting a sub-agent we previously did not provide
a value for mib_storage, which was alright because ets
was assumed as a default in every place where it was used.
Now we expect the value to be defined and therefor we
must explicitly add the default value for sub-agents when
staring them.
-rw-r--r-- | lib/snmp/src/agent/snmpa_agent_sup.erl | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/snmp/src/agent/snmpa_agent_sup.erl b/lib/snmp/src/agent/snmpa_agent_sup.erl index 9b8c4d12a6..2805e2dc0d 100644 --- a/lib/snmp/src/agent/snmpa_agent_sup.erl +++ b/lib/snmp/src/agent/snmpa_agent_sup.erl @@ -29,10 +29,12 @@ -export([init/1]). -define(SERVER, ?MODULE). +%% Always use plain ets for sub-agents -ifdef(snmp_debug). --define(DEFAULT_OPTS, [{verbosity, trace}]). +-define(DEFAULT_SA_OPTS, [{mib_storage, [{module, snmpa_mib_storage_ets}]}, + {verbosity, trace}]). -else. --define(DEFAULT_OPTS, []). +-define(DEFAULT_SA_OPTS, [{mib_storage, [{module, snmpa_mib_storage_ets}]}]). -endif. @@ -63,8 +65,8 @@ start_subagent(ParentAgent, Subtree, Mibs) -> Ref = make_ref(), ?d("start_subagent -> Ref: ~p", [Ref]), Options = [{priority, Prio}, - {mibs, Mibs}, - {misc_sup, snmpa_misc_sup} | ?DEFAULT_OPTS], + {mibs, Mibs}, + {misc_sup, snmpa_misc_sup} | ?DEFAULT_SA_OPTS], Agent = {{sub_agent, Max}, {snmpa_agent, start_link, [Prio, ParentAgent, Ref, Options]}, |