aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/src/misc/snmp_conf.erl
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/misc/snmp_conf.erl
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/misc/snmp_conf.erl')
-rw-r--r--lib/snmp/src/misc/snmp_conf.erl8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/snmp/src/misc/snmp_conf.erl b/lib/snmp/src/misc/snmp_conf.erl
index f4483995cb..153c8070c2 100644
--- a/lib/snmp/src/misc/snmp_conf.erl
+++ b/lib/snmp/src/misc/snmp_conf.erl
@@ -749,8 +749,6 @@ which_domain({A0, A1, A2, A3, A4, A5, A6, A7})
%% ---------
-mk_addr_string({_IP, Port} = Addr) when is_integer(Port) ->
- mk_addr_string({snmpUDPDomain, Addr});
mk_addr_string({Domain, Addr}) when is_atom(Domain) ->
%% XXX There is only code for IP domains here
case check_address_ip(Domain, Addr) of
@@ -768,7 +766,11 @@ mk_addr_string({Domain, Addr}) when is_atom(Domain) ->
mk_addr_string_ntoa(Domain, Addr);
IP ->
mk_addr_string_ntoa(Domain, IP)
- end.
+ end;
+mk_addr_string({_IP, Port} = Addr) when is_integer(Port) ->
+ mk_addr_string({snmpUDPDomain, Addr});
+mk_addr_string(Strange) ->
+ lists:flatten(io_lib:format("~w", [Strange])).
mk_addr_string_ntoa({_, _, _, _} = IP) ->