aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/src/agent
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2014-04-17 16:29:51 +0200
committerRaimo Niskanen <[email protected]>2014-07-25 12:14:44 +0200
commit373d9fa059875a2d68251c485968d3aa78e830b4 (patch)
treebefc6315db5b1da0790120cb12eb03f7bfb9dc16 /lib/snmp/src/agent
parent7bc7e5821ea0614ca82467bf0349f82b61d89971 (diff)
downloadotp-373d9fa059875a2d68251c485968d3aa78e830b4.tar.gz
otp-373d9fa059875a2d68251c485968d3aa78e830b4.tar.bz2
otp-373d9fa059875a2d68251c485968d3aa78e830b4.zip
wip-all-regression-tests-but-one-manager
Diffstat (limited to 'lib/snmp/src/agent')
-rw-r--r--lib/snmp/src/agent/snmp_target_mib.erl15
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/snmp/src/agent/snmp_target_mib.erl b/lib/snmp/src/agent/snmp_target_mib.erl
index cff1e253c3..3bcfd469e6 100644
--- a/lib/snmp/src/agent/snmp_target_mib.erl
+++ b/lib/snmp/src/agent/snmp_target_mib.erl
@@ -263,7 +263,7 @@ check_target_addr(
TagList, Params, EngineId, Mask, MMS]),
snmp_conf:check_string(Name,{gt,0}),
snmp_conf:check_domain(Domain),
- NAddress = snmp_conf:check_address(Domain, Address),
+ NAddress = check_address(Domain, Address),
snmp_conf:check_integer(Timeout, {gte, 0}),
snmp_conf:check_integer(RetryCount, {gte,0}),
snmp_conf:check_string(TagList),
@@ -290,19 +290,20 @@ check_address(Domain, Address) ->
case snmp_conf:check_address(Domain, Address) of
ok ->
Address;
- {ok, FixedAddress} ->
- FixedAddress
+ {ok, NAddress} ->
+ NAddress
end.
-check_mask(_Domain, []) ->
- [];
+check_mask(_Domain, [] = Mask) ->
+ Mask;
check_mask(Domain, Mask) ->
try check_address(Domain, Mask)
catch
- {error, {invalid_address, Info}} ->
- error({invalid_mask, Info})
+ {error, {bad_address, Info}} ->
+ error({bad_mask, Info})
end.
+
%%-----------------------------------------------------------------
%% TargetParams
%% {Name, MPModel, SecurityModel, SecurityName, SecurityLevel}