This quick patch fixes the SNMP GETNEXT search when given an OID outside
the Squid MIB. This allows proper integration of Squid into proxy SNMP
agents.
Forward port of 2.5 patch.
/*
- * $Id: snmp_core.cc,v 1.68 2005/06/09 16:04:30 serassio Exp $
+ * $Id: snmp_core.cc,v 1.69 2005/08/30 20:44:00 serassio Exp $
*
* DEBUG: section 49 SNMP support
* AUTHOR: Glenn Chisholm
count++;
while ((mibTreeEntry) && (count < CurrentLen) && (!mibTreeEntry->parsefunction)) {
- mibTreeEntry = snmpTreeEntry(Current[count], count, mibTreeEntry);
+ mib_tree_entry *nextmibTreeEntry = snmpTreeEntry(Current[count], count, mibTreeEntry);
+
+ if (!nextmibTreeEntry)
+ break;
+ else
+ mibTreeEntry = nextmibTreeEntry;
+
count++;
}