iliaa Sun May 31 14:11:14 2009 UTC
Modified files:
/php-src/ext/snmp snmp.c
Log:
MFB: Fixed bug #48359 (Script hangs on snmprealwalk if OID is not
increasing)
http://cvs.php.net/viewvc.cgi/php-src/ext/snmp/snmp.c?r1=1.125&r2=1.126&diff_format=u
Index: php-src/ext/snmp/snmp.c
diff -u php-src/ext/snmp/snmp.c:1.125 php-src/ext/snmp/snmp.c:1.126
--- php-src/ext/snmp/snmp.c:1.125 Sat May 2 21:13:39 2009
+++ php-src/ext/snmp/snmp.c Sun May 31 14:11:14 2009
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: snmp.c,v 1.125 2009/05/02 21:13:39 jani Exp $ */
+/* $Id: snmp.c,v 1.126 2009/05/31 14:11:14 iliaa Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -677,9 +677,14 @@
if (st >= SNMP_CMD_WALK && st !=
SNMP_CMD_SET) {
if (vars->type !=
SNMP_ENDOFMIBVIEW &&
vars->type !=
SNMP_NOSUCHOBJECT && vars->type != SNMP_NOSUCHINSTANCE) {
- memmove((char *)name,
(char *)vars->name,vars->name_length * sizeof(oid));
- name_length =
vars->name_length;
- keepwalking = 1;
+ if
(snmp_oid_compare(name, name_length, vars->name, vars->name_length) >= 0) {
+
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error: OID not increasing:
%s",name);
+ keepwalking = 0;
+ } else {
+ memmove((char
*)name, (char *)vars->name,vars->name_length * sizeof(oid));
+ name_length =
vars->name_length;
+ keepwalking = 1;
+ }
}
}
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php