cvs: php-src(PHP_5_0) / NEWS /ext/snmp snmp.c

From: Date: Tue, 07 Dec 2004 00:33:58 +0000
Subject: cvs: php-src(PHP_5_0) / NEWS /ext/snmp snmp.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-29453@lists.php.net to get a copy of this message
iliaa Mon Dec 6 19:33:58 2004 EDT Modified files: (Branch: PHP_5_0) /php-src NEWS /php-src/ext/snmp snmp.c Log: MFH: Fixed bug #30995 (snmp extension does not build with net-snmp 5.2). http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1760.2.144&r2=1.1760.2.145&ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1760.2.144 php-src/NEWS:1.1760.2.145 --- php-src/NEWS:1.1760.2.144 Mon Dec 6 18:31:07 2004 +++ php-src/NEWS Mon Dec 6 19:33:58 2004 @@ -7,6 +7,7 @@ - Extended the functionality of is_subclass_of() to accept either a class name or an object as first parameter. (Andrey) - Fixed potential problems with unserializing invalid serialize data. (Marcus) +- Fixed bug #30995 (snmp extension does not build with net-snmp 5.2). (Ilia) - Fixed bug #30990 (allow popen() on *NIX to accept 'b' flag). (Ilia) - Fixed bug #30967 (properties in extended mysqli classes don't work). (Georg) - Fixed bug #30922 (reflective functions crash PHP when interfaces extend http://cvs.php.net/diff.php/php-src/ext/snmp/snmp.c?r1=1.92&r2=1.92.2.1&ty=u Index: php-src/ext/snmp/snmp.c diff -u php-src/ext/snmp/snmp.c:1.92 php-src/ext/snmp/snmp.c:1.92.2.1 --- php-src/ext/snmp/snmp.c:1.92 Tue Mar 23 18:12:50 2004 +++ php-src/ext/snmp/snmp.c Mon Dec 6 19:33:58 2004 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: snmp.c,v 1.92 2004/03/23 23:12:50 iliaa Exp $ */ +/* $Id: snmp.c,v 1.92.2.1 2004/12/07 00:33:58 iliaa Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -787,7 +787,21 @@ s->securityPrivProtoLen = OIDSIZE(usmDESPrivProtocol); return (0); #ifdef HAVE_AES - } else if (!strcasecmp(prot, "AES128")) { + } else if (!strcasecmp(prot, "AES128") +#ifdef SNMP_VALIDATE_ERR +/* +* In Net-SNMP before 5.2, the following symbols exist: +* usmAES128PrivProtocol, usmAES192PrivProtocol, usmAES256PrivProtocol +* In an effort to be more standards-compliant, 5.2 removed the last two. +* As of 5.2, the symbols are: +* usmAESPrivProtocol, usmAES128PrivProtocol +* +* As we want this extension to compile on both versions, we use the latter +* symbol on purpose, as it's defined to be the same as the former. +*/ + || !strcasecmp(prot, "AES")) { +#else + ) { s->securityPrivProto = usmAES128PrivProtocol; s->securityPrivProtoLen = OIDSIZE(usmAES128PrivProtocol); return (0); @@ -800,6 +814,7 @@ s->securityPrivProtoLen = OIDSIZE(usmAES256PrivProtocol); return (0); #endif +#endif } else if (strlen(prot)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid privacy protocol: %s", prot); }

« previous php.cvs (#29453) next »