[SNMP4J] SnmpNotificationMIB corrections

Joakim Althini joakim.althini at symsoft.com
Mon May 26 15:25:15 CEST 2008


Hi, I've been using notification filters and had to make some corrections 

to SnmpNotificationMIB  to make it work. The first fix was suggested by 

Frank Fock (thanks), the rest are my own conclusions:

 

@@ -290,7 +290,8 @@

     MOTableRowFilter activeFilter =

         new
RowStatus.ActiveRowsFilter(idxSnmpNotifyFilterProfileRowStatus);

     List profiles =

-        snmpNotifyFilterProfileEntryModel.getRows(paramsIndex, paramsIndex,

+        snmpNotifyFilterProfileEntryModel.getRows(paramsIndex, 

+                                                  paramsIndex.successor(),

                                                   activeFilter);

     if (profiles.size() == 0) {

       // no profile -> passes filter

@@ -298,8 +299,8 @@

     }

     OctetString profileName = (OctetString)

 
((MOTableRow)profiles.get(0)).getValue(idxSnmpNotifyFilterProfileName);

-    OID profileNameOID = profileName.toSubIndex(true);

-    OID profileNameOIDNext = profileNameOID.successor();

+    OID profileNameOID = profileName.toSubIndex(false);

+    OID profileNameOIDNext = null;

     activeFilter = new
RowStatus.ActiveRowsFilter(idxSnmpNotifyFilterRowStatus);

     List filters =

         snmpNotifyFilterEntryModel.getRows(profileNameOID,

 

 

Best regards

 

/Joakim Althini, Symsoft




More information about the SNMP4J mailing list