diff options
author | Micael Karlberg <[email protected]> | 2010-06-09 12:00:00 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2010-08-20 08:59:16 +0200 |
commit | 5af245e617ea5abad86131e194d304a66c72dd5d (patch) | |
tree | bd7f577e79cfc95fd2d6f01c0dd9c49a10cc37b5 /lib/snmp/src/agent/snmpa.erl | |
parent | 90e04f98a65a7f261ab9ba79917394b5d68bb650 (diff) | |
download | otp-5af245e617ea5abad86131e194d304a66c72dd5d.tar.gz otp-5af245e617ea5abad86131e194d304a66c72dd5d.tar.bz2 otp-5af245e617ea5abad86131e194d304a66c72dd5d.zip |
snmp: Patch 1125
OTP-8478 [agent] Added very basic support for multiple SNMPv3 EngineIDs
in a single agent.
Diffstat (limited to 'lib/snmp/src/agent/snmpa.erl')
-rw-r--r-- | lib/snmp/src/agent/snmpa.erl | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/snmp/src/agent/snmpa.erl b/lib/snmp/src/agent/snmpa.erl index 1c37d76074..87b191caed 100644 --- a/lib/snmp/src/agent/snmpa.erl +++ b/lib/snmp/src/agent/snmpa.erl @@ -61,7 +61,7 @@ register_subagent/3, unregister_subagent/2, send_notification/3, send_notification/4, send_notification/5, - send_notification/6, + send_notification/6, send_notification/7, send_trap/3, send_trap/4, discovery/2, discovery/3, discovery/4, discovery/5, discovery/6, @@ -423,14 +423,23 @@ send_notification(Agent, Notification, Recv, Varbinds) -> send_notification(Agent, Notification, Recv, NotifyName, Varbinds) -> send_notification(Agent, Notification, Recv, NotifyName, "", Varbinds). -send_notification(Agent, Notification, Recv, - NotifyName, ContextName, Varbinds) +send_notification(Agent, Notification, Recv, NotifyName, + ContextName, Varbinds) when (is_list(NotifyName) andalso is_list(ContextName) andalso is_list(Varbinds)) -> snmpa_agent:send_trap(Agent, Notification, NotifyName, ContextName, Recv, Varbinds). +send_notification(Agent, Notification, Recv, + NotifyName, ContextName, Varbinds, LocalEngineID) + when (is_list(NotifyName) andalso + is_list(ContextName) andalso + is_list(Varbinds) andalso + is_list(LocalEngineID)) -> + snmpa_agent:send_trap(Agent, Notification, NotifyName, + ContextName, Recv, Varbinds, LocalEngineID). + %% Kept for backwards compatibility send_trap(Agent, Trap, Community) -> send_notification(Agent, Trap, no_receiver, Community, "", []). |