diff options
Diffstat (limited to 'examples/hlapi/asyncore/agent/ntforg/async-running-multiple-snmp-engines-at-once.py')
-rw-r--r-- | examples/hlapi/asyncore/agent/ntforg/async-running-multiple-snmp-engines-at-once.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/examples/hlapi/asyncore/agent/ntforg/async-running-multiple-snmp-engines-at-once.py b/examples/hlapi/asyncore/agent/ntforg/async-running-multiple-snmp-engines-at-once.py index 9df9daf..ce9db15 100644 --- a/examples/hlapi/asyncore/agent/ntforg/async-running-multiple-snmp-engines-at-once.py +++ b/examples/hlapi/asyncore/agent/ntforg/async-running-multiple-snmp-engines-at-once.py @@ -68,12 +68,10 @@ snmpEngineA.registerTransportDispatcher(transportDispatcher, 'A') snmpEngineB = SnmpEngine() snmpEngineB.registerTransportDispatcher(transportDispatcher, 'B') -ntfOrg = AsyncNotificationOriginator() - for authData, transportTarget, contextData in targets: snmpEngine = transportTarget.getTransportInfo()[1][1] % 3 and \ snmpEngineA or snmpEngineB - sendPduHandle = ntfOrg.sendNotification( + sendPduHandle = sendNotification( snmpEngine, authData, transportTarget, @@ -82,7 +80,7 @@ for authData, transportTarget, contextData in targets: NotificationType( ObjectIdentity('SNMPv2-MIB', 'coldStart') ).addVarBinds( ( '1.3.6.1.2.1.1.1.0', 'my name' ) ), - cbInfo=(cbFun, snmpEngine) + cbFun=cbFun, cbCtx=snmpEngine ) transportDispatcher.runDispatcher() |