aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/src/agent/snmpa_agent.erl
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2014-05-14 08:22:23 +0200
committerRaimo Niskanen <[email protected]>2014-07-25 12:15:15 +0200
commit9a955974c52baa62ca7283f86257ddca59d4dfd3 (patch)
tree3116bf04fef8ee1d29089366e0d0835770db7a11 /lib/snmp/src/agent/snmpa_agent.erl
parentb012122510b88bd752652bbd400cc03e68c45a7e (diff)
downloadotp-9a955974c52baa62ca7283f86257ddca59d4dfd3.tar.gz
otp-9a955974c52baa62ca7283f86257ddca59d4dfd3.tar.bz2
otp-9a955974c52baa62ca7283f86257ddca59d4dfd3.zip
wip: Fix agent logging
Diffstat (limited to 'lib/snmp/src/agent/snmpa_agent.erl')
-rw-r--r--lib/snmp/src/agent/snmpa_agent.erl10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/snmp/src/agent/snmpa_agent.erl b/lib/snmp/src/agent/snmpa_agent.erl
index dadd9d7ccd..6d3f1cca4a 100644
--- a/lib/snmp/src/agent/snmpa_agent.erl
+++ b/lib/snmp/src/agent/snmpa_agent.erl
@@ -2516,7 +2516,15 @@ process_msg(
MibView, Vsn, Pdu, PduMS, Community,
SourceAddress, ContextName, GbMaxVBs) ->
#pdu{request_id = ReqId} = Pdu,
- put(snmp_address, SourceAddress),
+ put(
+ snmp_address,
+ case SourceAddress of
+ {Domain, _} when is_atom(Domain) ->
+ SourceAddress;
+ {Ip, Port} when is_integer(Port) ->
+ %% Legacy transport domain
+ {tuple_to_list(Ip), Port}
+ end),
put(snmp_request_id, ReqId),
put(snmp_community, Community),
put(snmp_context, ContextName),