diff options
author | Raimo Niskanen <[email protected]> | 2014-05-21 14:33:50 +0200 |
---|---|---|
committer | Raimo Niskanen <[email protected]> | 2014-07-25 12:15:16 +0200 |
commit | e3f49c557c2cf0f4e98bbe538af4142167bac6ad (patch) | |
tree | 96fa44180a6ea625f6dd244ebd4fa9ef44332dc6 /lib/snmp/src/misc/snmp_log.erl | |
parent | cc1ab998ce905cd673c7ea14ee4e31ddb2412350 (diff) | |
download | otp-e3f49c557c2cf0f4e98bbe538af4142167bac6ad.tar.gz otp-e3f49c557c2cf0f4e98bbe538af4142167bac6ad.tar.bz2 otp-e3f49c557c2cf0f4e98bbe538af4142167bac6ad.zip |
Rewrite string representation of addresses and stop printing an error report when snmpa_net_if gets externally killed
Diffstat (limited to 'lib/snmp/src/misc/snmp_log.erl')
-rw-r--r-- | lib/snmp/src/misc/snmp_log.erl | 9 |
1 files changed, 6 insertions, 3 deletions
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]). |