From e910f8568a4d19093f7ea8c6865367c3e73703f0 Mon Sep 17 00:00:00 2001 From: Raimo Niskanen Date: Thu, 7 Aug 2014 17:31:10 +0200 Subject: Fix error printouts to not crash --- lib/snmp/src/agent/snmp_framework_mib.erl | 6 ++++-- lib/snmp/src/agent/snmpa_net_if.erl | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'lib/snmp') diff --git a/lib/snmp/src/agent/snmp_framework_mib.erl b/lib/snmp/src/agent/snmp_framework_mib.erl index 922215ff00..9d3f7ef5e7 100644 --- a/lib/snmp/src/agent/snmp_framework_mib.erl +++ b/lib/snmp/src/agent/snmp_framework_mib.erl @@ -201,9 +201,11 @@ check_agent({intAgentIpAddress, _}, {_, undefined}) -> check_agent({intAgentIpAddress = Tag, Ip} = Entry, {Domain, Port} = State) -> {case snmp_conf:check_ip(Domain, Ip) of ok -> - [Entry, {intAgentTransports, [{Domain, {Ip, Port}}]}]; + [Entry, + {intAgentTransports, [{Domain, {Ip, Port}}]}]; {ok, FixedIp} -> - [{Tag, Ip}, {intAgentTransports, [{Domain, {FixedIp, Port}}]}] + [{Tag, FixedIp}, + {intAgentTransports, [{Domain, {FixedIp, Port}}]}] end, State}; check_agent({intAgentTransports = Tag, Transports}, {_, Port} = State) -> CheckedTransports = diff --git a/lib/snmp/src/agent/snmpa_net_if.erl b/lib/snmp/src/agent/snmpa_net_if.erl index 389c26834d..840d56d563 100644 --- a/lib/snmp/src/agent/snmpa_net_if.erl +++ b/lib/snmp/src/agent/snmpa_net_if.erl @@ -1064,7 +1064,7 @@ do_handle_send_pdu1( "Can not find transport~n" " size: ~p~n" " to: ~s", - [sz(Packet), To]); + [sz(Packet), format_address(To)]); Transport -> maybe_udp_send(S, Transport, To, Packet) end; @@ -1080,7 +1080,7 @@ do_handle_send_pdu1( "Can not find transport~n" " size: ~p~n" " to: ~s", - [sz(Packet), To]); + [sz(Packet), format_address(To)]); Transport -> maybe_udp_send(S, Transport, To, Packet, Type, LogData) end -- cgit v1.2.3