diff options
author | Raimo Niskanen <[email protected]> | 2014-08-29 11:19:52 +0200 |
---|---|---|
committer | Raimo Niskanen <[email protected]> | 2014-09-03 16:03:19 +0200 |
commit | 5bd1edc7b53dbcea6f63e0a7fb57925935e6b293 (patch) | |
tree | 34c29df796dea4ee090e8c787010eca5a3c05649 /lib/snmp/src/manager/snmpm_server.erl | |
parent | 46f752b15205977cb1191c1693e942a499d351f9 (diff) | |
download | otp-5bd1edc7b53dbcea6f63e0a7fb57925935e6b293.tar.gz otp-5bd1edc7b53dbcea6f63e0a7fb57925935e6b293.tar.bz2 otp-5bd1edc7b53dbcea6f63e0a7fb57925935e6b293.zip |
Clean up some config warts
Diffstat (limited to 'lib/snmp/src/manager/snmpm_server.erl')
-rw-r--r-- | lib/snmp/src/manager/snmpm_server.erl | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/snmp/src/manager/snmpm_server.erl b/lib/snmp/src/manager/snmpm_server.erl index ece5dad082..a75122d0bb 100644 --- a/lib/snmp/src/manager/snmpm_server.erl +++ b/lib/snmp/src/manager/snmpm_server.erl @@ -2079,7 +2079,16 @@ do_handle_agent(DefUserId, DefMod, SnmpInfo, DefData, State) -> ?vdebug("do_handle_agent -> entry when" "~n DefUserId: ~p", [DefUserId]), - try DefMod:handle_agent(Domain, Addr, Type, SnmpInfo, DefData) of + {Domain_or_Ip, Addr_or_Port} = + case Domain of + snmpUDPDomain -> + Addr; + _ -> + {Domain, Addr} + end, + try DefMod:handle_agent( + Domain_or_Ip, Addr_or_Port, Type, SnmpInfo, DefData) + of {register, UserId2, TargetName, Config} -> ?vtrace("do_handle_agent -> register: " "~n UserId2: ~p" |