[prev in list] [next in list] [prev in thread] [next in thread]
List: php-cvs
Subject: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/snmp snmp.c
From: "Ilia Alshanetsky" <iliaa () php ! net>
Date: 2009-05-31 14:11:04
Message-ID: cvsiliaa1243779064 () cvsserver
[Download RAW message or body]
iliaa Sun May 31 14:11:04 2009 UTC
Modified files: (Branch: PHP_5_3)
/php-src/ext/snmp snmp.c
Log:
Fixed bug #48359 (Script hangs on snmprealwalk if OID is not increasing)
# Original patch by simonov at gmail dot com
http://cvs.php.net/viewvc.cgi/php-src/ext/snmp/snmp.c?r1=1.106.2.2.2.5.2.11&r2=1.106.2.2.2.5.2.12&diff_format=u
Index: php-src/ext/snmp/snmp.c
diff -u php-src/ext/snmp/snmp.c:1.106.2.2.2.5.2.11 \
php-src/ext/snmp/snmp.c:1.106.2.2.2.5.2.12
--- php-src/ext/snmp/snmp.c:1.106.2.2.2.5.2.11 Sat May 2 21:13:54 2009
+++ php-src/ext/snmp/snmp.c Sun May 31 14:11:04 2009
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: snmp.c,v 1.106.2.2.2.5.2.11 2009/05/02 21:13:54 jani Exp $ */
+/* $Id: snmp.c,v 1.106.2.2.2.5.2.12 2009/05/31 14:11:04 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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic