lytboris                                 Fri, 04 Mar 2011 18:58:01 +0000

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

Log:
* fix warning about redefining REGISTER_PDO_CLASS_CONST_LONG (damn copy'n'paste)
* tuned two unit test that failed at gcov.php.net/PHP_HEAD

Changed paths:
    U   php/php-src/trunk/ext/snmp/php_snmp.h
    U   php/php-src/trunk/ext/snmp/snmp.c
    U   php/php-src/trunk/ext/snmp/tests/snmp2_set.phpt
    U   php/php-src/trunk/ext/snmp/tests/wrong_hostname.phpt

Modified: php/php-src/trunk/ext/snmp/php_snmp.h
===================================================================
--- php/php-src/trunk/ext/snmp/php_snmp.h       2011-03-04 18:48:22 UTC (rev 
308930)
+++ php/php-src/trunk/ext/snmp/php_snmp.h       2011-03-04 18:58:01 UTC (rev 
308931)
@@ -124,7 +124,7 @@
 #define SNMP_G(v) (snmp_globals.v)
 #endif

-#define REGISTER_PDO_CLASS_CONST_LONG(const_name, value) \
+#define REGISTER_SNMP_CLASS_CONST_LONG(const_name, value) \
        zend_declare_class_constant_long(php_snmp_get_ce(), const_name, 
sizeof(const_name)-1, (long)value TSRMLS_CC);

 #else

Modified: php/php-src/trunk/ext/snmp/snmp.c
===================================================================
--- php/php-src/trunk/ext/snmp/snmp.c   2011-03-04 18:48:22 UTC (rev 308930)
+++ php/php-src/trunk/ext/snmp/snmp.c   2011-03-04 18:58:01 UTC (rev 308931)
@@ -2436,11 +2436,11 @@
        REGISTER_LONG_CONSTANT("SNMP_VERSION_2c",       SNMP_VERSION_2c,        
CONST_CS | CONST_PERSISTENT);
        REGISTER_LONG_CONSTANT("SNMP_VERSION_3",        SNMP_VERSION_3,         
CONST_CS | CONST_PERSISTENT);

-       REGISTER_PDO_CLASS_CONST_LONG("ERRNO_NOERROR",                  
(long)PHP_SNMP_ERRNO_NOERROR);
-       REGISTER_PDO_CLASS_CONST_LONG("ERRNO_GENERIC",                  
(long)PHP_SNMP_ERRNO_GENERIC);
-       REGISTER_PDO_CLASS_CONST_LONG("ERRNO_TIMEOUT",                  
(long)PHP_SNMP_ERRNO_TIMEOUT);
-       REGISTER_PDO_CLASS_CONST_LONG("ERRNO_ERROR_IN_REPLY",           
(long)PHP_SNMP_ERRNO_ERROR_IN_REPLY);
-       REGISTER_PDO_CLASS_CONST_LONG("ERRNO_OID_NOT_INCREASING",       
(long)PHP_SNMP_ERRNO_OID_NOT_INCREASING);
+       REGISTER_SNMP_CLASS_CONST_LONG("ERRNO_NOERROR",                 
(long)PHP_SNMP_ERRNO_NOERROR);
+       REGISTER_SNMP_CLASS_CONST_LONG("ERRNO_GENERIC",                 
(long)PHP_SNMP_ERRNO_GENERIC);
+       REGISTER_SNMP_CLASS_CONST_LONG("ERRNO_TIMEOUT",                 
(long)PHP_SNMP_ERRNO_TIMEOUT);
+       REGISTER_SNMP_CLASS_CONST_LONG("ERRNO_ERROR_IN_REPLY",          
(long)PHP_SNMP_ERRNO_ERROR_IN_REPLY);
+       REGISTER_SNMP_CLASS_CONST_LONG("ERRNO_OID_NOT_INCREASING",      
(long)PHP_SNMP_ERRNO_OID_NOT_INCREASING);

        return SUCCESS;
 }

Modified: php/php-src/trunk/ext/snmp/tests/snmp2_set.phpt
===================================================================
--- php/php-src/trunk/ext/snmp/tests/snmp2_set.phpt     2011-03-04 18:48:22 UTC 
(rev 308930)
+++ php/php-src/trunk/ext/snmp/tests/snmp2_set.phpt     2011-03-04 18:58:01 UTC 
(rev 308931)
@@ -224,13 +224,13 @@
 bool(true)
 Multiple OID, 1st bogus, single type, multiple value

-Warning: snmp2_set(): Error in packet at '%s': noCreation (That table does not 
support row creation or that object can not ever be created) in %s on line %d
+Warning: snmp2_set(): Error in packet at '%s': %rnoCreation|notWritable%r (%s) 
in %s on line %d
 bool(false)
 bool(true)
 bool(true)
 Multiple OID, 2nd bogus, single type, multiple value

-Warning: snmp2_set(): Error in packet at '%s': noCreation (That table does not 
support row creation or that object can not ever be created) in %s on line %d
+Warning: snmp2_set(): Error in packet at '%s': %rnoCreation|notWritable%r (%s) 
in %s on line %d
 bool(false)
 bool(true)
 bool(true)

Modified: php/php-src/trunk/ext/snmp/tests/wrong_hostname.phpt
===================================================================
--- php/php-src/trunk/ext/snmp/tests/wrong_hostname.phpt        2011-03-04 
18:48:22 UTC (rev 308930)
+++ php/php-src/trunk/ext/snmp/tests/wrong_hostname.phpt        2011-03-04 
18:58:01 UTC (rev 308931)
@@ -18,5 +18,5 @@

 ?>
 --EXPECTF--
-Warning: snmpget(): Could not open snmp connection: Unknown host 
(192.168..6.1) (Bad file descriptor) in %s on line %d
+Warning: snmpget(): Could not open snmp connection: Unknown host 
(192.168..6.1) (%s) in %s on line %d
 bool(false)
\ No newline at end of file

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to