1. Floris Bruynooghe
  2. pysnmp-mirror

Commits

elie  committed 4d837f4

use system uptime and trap OID values from SNMP engine's instrumentation
rather then from SNMP context

  • Participants
  • Parent commits 77dd6df
  • Branches default

Comments (0)

Files changed (2)

File CHANGES

View file
  • Ignore whitespace
   NotificationOriginator.sendNotification()
 - Fix to isAccessAllowed() error handling at NotificationOriginator. System
   used to crash on access denied condition.
+- Fix to NotificationOriginator to make it use system uptime and trap OID
+  values from SNMP engine's instrumentation rather then from SNMP context.
 
 Revision 4.2.3
 --------------

File pysnmp/entity/rfc3413/ntforg.py

View file
  • Ignore whitespace
             varBinds = []
             
             # 3.3.2 & 3.3.3
-            sysUpTime, = contextMibInstrumCtl.mibBuilder.importSymbols(
-                '__SNMPv2-MIB', 'sysUpTime'
-                )
+            sysUpTime, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__SNMPv2-MIB', 'sysUpTime')
 
             for varName, varVal in additionalVarBinds:
                 if varName == sysUpTime.name:
                 varBinds.append((sysUpTime.name,
                                  sysUpTime.syntax.clone())) # for actual value
 
-            snmpTrapOid, = contextMibInstrumCtl.mibBuilder.importSymbols(
-                '__SNMPv2-MIB', 'snmpTrapOID'
-                )
+            snmpTrapOid, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__SNMPv2-MIB', 'snmpTrapOID')
             if notificationName:
                 varBinds.append(
                     (snmpTrapOid.name,