diff options
author | Micael Karlberg <[email protected]> | 2010-06-04 08:38:33 +0000 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2010-06-04 08:38:33 +0000 |
commit | 2fe0210c7f5e3cd33bd1980c4ae5f8079d5682e6 (patch) | |
tree | 66a9c869058aae92d76f3ba700df8bffc765143b /lib/snmp/src/agent/snmpa.erl | |
parent | 02a3667376af950bb75523e32d2a974c4939261b (diff) | |
download | otp-2fe0210c7f5e3cd33bd1980c4ae5f8079d5682e6.tar.gz otp-2fe0210c7f5e3cd33bd1980c4ae5f8079d5682e6.tar.bz2 otp-2fe0210c7f5e3cd33bd1980c4ae5f8079d5682e6.zip |
OTP-8478: Added 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, "", []). |