From e3f49c557c2cf0f4e98bbe538af4142167bac6ad Mon Sep 17 00:00:00 2001 From: Raimo Niskanen Date: Wed, 21 May 2014 14:33:50 +0200 Subject: Rewrite string representation of addresses and stop printing an error report when snmpa_net_if gets externally killed --- lib/snmp/src/misc/snmp_log.erl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lib/snmp/src/misc/snmp_log.erl') diff --git a/lib/snmp/src/misc/snmp_log.erl b/lib/snmp/src/misc/snmp_log.erl index b3596909cd..a1fd392676 100644 --- a/lib/snmp/src/misc/snmp_log.erl +++ b/lib/snmp/src/misc/snmp_log.erl @@ -867,7 +867,8 @@ f(TimeStamp, SeqNo, %% [ip(Addr), Port, HdrStr, TimeStamp, SeqNo, Vsn, Str]). ipPort2Str(Ip, Port) -> - io_lib:format("~s:~w", [ip(Ip), Port]). + snmp_conf:mk_addr_string({Ip, Port}). + %% io_lib:format("~s:~w", [ip(Ip), Port]). %% Convert a timestamp 2-tupple to a printable string %% @@ -968,8 +969,10 @@ get_type(#pdu{type = Type}) -> Type. -ip({A,B,C,D}) -> - io_lib:format("~w.~w.~w.~w", [A,B,C,D]). +ip(Domain, Addr) -> + snmp_conf:mk_addr_string(Domain, Addr). +%% ip({A,B,C,D}) -> +%% io_lib:format("~w.~w.~w.~w", [A,B,C,D]). -- cgit v1.2.3