aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/src/manager
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2014-08-22 12:09:03 +0200
committerRaimo Niskanen <[email protected]>2014-08-22 12:09:03 +0200
commitbdbd6849aa811faf20d5ce7d577a49612266209a (patch)
treedad16dd76eebe0b8a0d2fe5fbff0f9040ffd7db0 /lib/snmp/src/manager
parent037590364fe8b5a657563cd7d28a20d84ee8d99f (diff)
downloadotp-bdbd6849aa811faf20d5ce7d577a49612266209a.tar.gz
otp-bdbd6849aa811faf20d5ce7d577a49612266209a.tar.bz2
otp-bdbd6849aa811faf20d5ce7d577a49612266209a.zip
Clean up config error handling and negative results
Diffstat (limited to 'lib/snmp/src/manager')
-rw-r--r--lib/snmp/src/manager/snmpm_config.erl7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/snmp/src/manager/snmpm_config.erl b/lib/snmp/src/manager/snmpm_config.erl
index d147aabb0b..05d5ce72b1 100644
--- a/lib/snmp/src/manager/snmpm_config.erl
+++ b/lib/snmp/src/manager/snmpm_config.erl
@@ -461,7 +461,7 @@ agent_info(Domain, Address, Item) when is_atom(Domain) ->
[Domain, Address, Item, _Thrown, erlang:get_stacktrace()]),
{error, not_found}
end;
-agent_info(Ip, Port, Item) ->
+agent_info(Ip, Port, Item) when is_integer(Port) ->
p(?MODULE_STRING":agent_info(~p, ~p, ~p) entry~n",
[Ip, Port, Item]),
Domain = default_transport_domain(),
@@ -1699,6 +1699,11 @@ check_agent_config(
EngineId, Timeout, MaxMessageSize,
Version, SecModel, SecName, SecLevel);
check_agent_config(
+ {_UserId, _TargetName, _Community, Domain, Addr,
+ _EngineId, _Timeout, _MaxMessageSize,
+ _Version, _SecModel, _SecName, _SecLevel}) ->
+ error({bad_address, {Domain, Addr}});
+check_agent_config(
{UserId, TargetName, Community, Domain, Ip, Port,
EngineId, Timeout, MaxMessageSize,
Version, SecModel, SecName, SecLevel}) ->