lytboris                                 Sun, 08 May 2011 09:20:58 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=310836

Log:
fix error reporting on OID not increasing
calling arguments markup

Changed paths:
    U   php/php-src/trunk/ext/snmp/snmp.c

Modified: php/php-src/trunk/ext/snmp/snmp.c
===================================================================
--- php/php-src/trunk/ext/snmp/snmp.c   2011-05-08 05:52:53 UTC (rev 310835)
+++ php/php-src/trunk/ext/snmp/snmp.c   2011-05-08 09:20:58 UTC (rev 310836)
@@ -837,10 +837,11 @@
                                        /* OID increase check */
                                        if (st & SNMP_CMD_WALK) {
                                                if (snmp_oid_compare(name, 
name_length, vars->name, vars->name_length) >= 0) {
-                                                       
php_snmp_error(getThis(), NULL TSRMLS_CC, PHP_SNMP_ERRNO_OID_NOT_INCREASING, 
"Error: OID not increasing: %s", name);
+                                                       snprint_objid(buf2, 
sizeof(buf2), vars->name, vars->name_length);
+                                                       
php_snmp_error(getThis(), NULL TSRMLS_CC, PHP_SNMP_ERRNO_OID_NOT_INCREASING, 
"Error: OID not increasing: %s", buf2);
                                                        keepwalking = 0;
                                                } else {
-                                                       memmove((char *)name, 
(char *)vars->name,vars->name_length * sizeof(oid));
+                                                       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

Reply via email to