[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/snmp snmp.c

2009-06-01 Thread Ilia Alshanetsky
iliaa   Mon Jun  1 13:10:57 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/snmp   snmp.c 
/php-srcNEWS 
  Log:
  
  Fixed bug #48273 (snmp*_real_walk() returns SNMP errors as values).
  
http://cvs.php.net/viewvc.cgi/php-src/ext/snmp/snmp.c?r1=1.106.2.2.2.9r2=1.106.2.2.2.10diff_format=u
Index: php-src/ext/snmp/snmp.c
diff -u php-src/ext/snmp/snmp.c:1.106.2.2.2.9 
php-src/ext/snmp/snmp.c:1.106.2.2.2.10
--- php-src/ext/snmp/snmp.c:1.106.2.2.2.9   Sun May 31 14:14:07 2009
+++ php-src/ext/snmp/snmp.c Mon Jun  1 13:10:56 2009
@@ -20,7 +20,7 @@
+--+
  */
 
-/* $Id: snmp.c,v 1.106.2.2.2.9 2009/05/31 14:14:07 iliaa Exp $ */
+/* $Id: snmp.c,v 1.106.2.2.2.10 2009/06/01 13:10:56 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -479,7 +479,7 @@
return;
} else if (st == SNMP_CMD_WALK) {

add_next_index_zval(return_value,snmpval); /* Add to returned array */
-   } else if (st == SNMP_CMD_REALWALK)  {
+   } else if (st == SNMP_CMD_REALWALK  
vars-type != SNMP_ENDOFMIBVIEW  vars-type != SNMP_NOSUCHOBJECT  
vars-type != SNMP_NOSUCHINSTANCE) {
 #ifdef HAVE_NET_SNMP
snprint_objid(buf2, 
sizeof(buf2), vars-name, vars-name_length);
 #else
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1537r2=1.2027.2.547.2.1538diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1537 php-src/NEWS:1.2027.2.547.2.1538
--- php-src/NEWS:1.2027.2.547.2.1537Mon Jun  1 09:00:54 2009
+++ php-src/NEWSMon Jun  1 13:10:57 2009
@@ -12,6 +12,8 @@
   files). (Pierre)
 - Fixed bug #48359 (Script hangs on snmprealwalk if OID is not
   increasing). (Ilia, simonov at gmail dot com)
+- Fixed bug #48273 (snmp*_real_walk() returns SNMP errors as values).
+  (Ilia, lytboris at gmail dot com)
 - Fixed bug #48247 (Crash on errors during startup). (Stas)
 - Fixed bug #42143 (The constant NAN is reported as 0 on Windows)
   (Kanwaljeet Singla, Venkat Raman Don)



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



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/snmp snmp.c

2009-05-31 Thread Ilia Alshanetsky
iliaa   Sun May 31 14:14:08 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/snmp   snmp.c 
/php-srcNEWS 
  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.106.2.2.2.8r2=1.106.2.2.2.9diff_format=u
Index: php-src/ext/snmp/snmp.c
diff -u php-src/ext/snmp/snmp.c:1.106.2.2.2.8 
php-src/ext/snmp/snmp.c:1.106.2.2.2.9
--- php-src/ext/snmp/snmp.c:1.106.2.2.2.8   Wed Dec 31 11:17:43 2008
+++ php-src/ext/snmp/snmp.c Sun May 31 14:14:07 2009
@@ -20,7 +20,7 @@
+--+
  */
 
-/* $Id: snmp.c,v 1.106.2.2.2.8 2008/12/31 11:17:43 sebastian Exp $ */
+/* $Id: snmp.c,v 1.106.2.2.2.9 2009/05/31 14:14:07 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -490,9 +490,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;
+   }
}
}
}   
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1534r2=1.2027.2.547.2.1535diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1534 php-src/NEWS:1.2027.2.547.2.1535
--- php-src/NEWS:1.2027.2.547.2.1534Sat May 30 16:42:50 2009
+++ php-src/NEWSSun May 31 14:14:07 2009
@@ -10,9 +10,12 @@
   arguments). (Arnaud)
 - Fixed bug #48378 (exif_read_data() segfaults on certain corrupted .jpeg 
   files). (Pierre)
+- Fixed bug #48359 (Script hangs on snmprealwalk if OID is not
+  increasing). (Ilia, simonov at gmail dot com)
 - Fixed bug #42143 (The constant NAN is reported as 0 on Windows)
   (Kanwaljeet Singla, Venkat Raman Don)
 
+
 27 May 2009, PHP 5.2.10RC1
 - Updated timezone database to version 2009.8 (2009h) (Derick)
 



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



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/snmp snmp.c

2008-09-06 Thread Alexey Zakhlestin
indeyetsSat Sep  6 08:18:38 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
/php-src/ext/snmp   snmp.c 
  Log:
  MFB: Fixed bug #45405 (snmp extension memory leak)
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1212r2=1.2027.2.547.2.1213diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1212 php-src/NEWS:1.2027.2.547.2.1213
--- php-src/NEWS:1.2027.2.547.2.1212Tue Sep  2 13:21:59 2008
+++ php-src/NEWSSat Sep  6 08:18:37 2008
@@ -19,6 +19,8 @@
 - Fixed a crash on invalid method in ReflectionParameter constructor.
   (Christian Seiler)
 
+- Fixed bug #45405 (snmp extension memory leak). (Federico Cuello, Rodrigo
+  Campos)
 - Fixed bug #45956 (parse_ini_file() does not return false with syntax errors
   in parsed file). (Jani)
 - Fixed bug #45862 (get_class_vars is inconsistent with 'protected' and 
http://cvs.php.net/viewvc.cgi/php-src/ext/snmp/snmp.c?r1=1.106.2.2.2.6r2=1.106.2.2.2.7diff_format=u
Index: php-src/ext/snmp/snmp.c
diff -u php-src/ext/snmp/snmp.c:1.106.2.2.2.6 
php-src/ext/snmp/snmp.c:1.106.2.2.2.7
--- php-src/ext/snmp/snmp.c:1.106.2.2.2.6   Mon Dec 31 07:20:11 2007
+++ php-src/ext/snmp/snmp.c Sat Sep  6 08:18:38 2008
@@ -20,7 +20,7 @@
+--+
  */
 
-/* $Id: snmp.c,v 1.106.2.2.2.6 2007/12/31 07:20:11 sebastian Exp $ */
+/* $Id: snmp.c,v 1.106.2.2.2.7 2008/09/06 08:18:38 indeyets Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -417,13 +417,13 @@
while (keepwalking) {
keepwalking = 0;
if ((st == SNMP_CMD_GET) || (st == SNMP_CMD_GETNEXT)) {
-   pdu = snmp_pdu_create((st == SNMP_CMD_GET) ? 
SNMP_MSG_GET : SNMP_MSG_GETNEXT);
name_length = MAX_OID_LEN;
if (!snmp_parse_oid(objid, name, name_length)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, 
Invalid object identifier: %s, objid);
snmp_close(ss);
RETURN_FALSE;
}
+   pdu = snmp_pdu_create((st == SNMP_CMD_GET) ? 
SNMP_MSG_GET : SNMP_MSG_GETNEXT);
snmp_add_null_var(pdu, name, name_length);
} else if (st == SNMP_CMD_SET) {
pdu = snmp_pdu_create(SNMP_MSG_SET);
@@ -434,6 +434,7 @@
sprint_objid(buf, name, name_length);
 #endif
php_error_docref(NULL TSRMLS_CC, E_WARNING, 
Could not add variable: %s %c %s, buf, type, value);
+   snmp_free_pdu(pdu);
snmp_close(ss);
RETURN_FALSE;
}
@@ -467,11 +468,13 @@
*return_value = *snmpval;
zval_copy_ctor(return_value);
zval_ptr_dtor(snmpval);
+   snmp_free_pdu(response);
snmp_close(ss);
return;
} else if (st == SNMP_CMD_GETNEXT) {
*return_value = *snmpval;
zval_copy_ctor(return_value);
+   snmp_free_pdu(response);
snmp_close(ss);
return;
} else if (st == SNMP_CMD_WALK) {
@@ -510,23 +513,28 @@
}
if (st == SNMP_CMD_GET) {
if ((pdu = 
snmp_fix_pdu(response, SNMP_MSG_GET)) != NULL) {
+   snmp_free_pdu(response);
goto retry;
}
} else if (st == SNMP_CMD_SET) {
if ((pdu = 
snmp_fix_pdu(response, SNMP_MSG_SET)) != NULL) {
+   snmp_free_pdu(response);
goto retry;
}
} else if (st == SNMP_CMD_GETNEXT) {
if ((pdu = 
snmp_fix_pdu(response, SNMP_MSG_GETNEXT)) != NULL) {
+   snmp_free_pdu(response);
goto retry;
}
 

[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/snmp snmp.c

2006-07-26 Thread Jani Taskinen
sniper  Wed Jul 26 23:57:44 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/snmp   snmp.c 
/php-srcNEWS 
  Log:
  MFH: - Fixed bug #37564 (AES privacy encryption not possible due to net-snmp 
5.2 compatibility issue)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/snmp/snmp.c?r1=1.106.2.2.2.1r2=1.106.2.2.2.2diff_format=u
Index: php-src/ext/snmp/snmp.c
diff -u php-src/ext/snmp/snmp.c:1.106.2.2.2.1 
php-src/ext/snmp/snmp.c:1.106.2.2.2.2
--- php-src/ext/snmp/snmp.c:1.106.2.2.2.1   Thu Jun 15 18:33:08 2006
+++ php-src/ext/snmp/snmp.c Wed Jul 26 23:57:43 2006
@@ -20,7 +20,7 @@
+--+
  */
 
-/* $Id: snmp.c,v 1.106.2.2.2.1 2006/06/15 18:33:08 dmitry Exp $ */
+/* $Id: snmp.c,v 1.106.2.2.2.2 2006/07/26 23:57:43 sniper Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -834,10 +834,14 @@
 * 
 * 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.
+*
+* However, in 5.2 the type of usmAES128PrivProtocol is a pointer, not an
+* array, so we cannot use the OIDSIZE macro because it uses sizeof().
+*
 */
|| !strcasecmp(prot, AES)) {
s-securityPrivProto = usmAES128PrivProtocol;
-   s-securityPrivProtoLen = 
OIDSIZE(usmAES128PrivProtocol);
+   s-securityPrivProtoLen = USM_PRIV_PROTO_AES128_LEN;
return (0);
 #else  
) {
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.151r2=1.2027.2.547.2.152diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.151 php-src/NEWS:1.2027.2.547.2.152
--- php-src/NEWS:1.2027.2.547.2.151 Wed Jul 26 15:29:27 2006
+++ php-src/NEWSWed Jul 26 23:57:43 2006
@@ -21,6 +21,8 @@
   itself). (Ilia)
 - Fixed bug #38132 (ReflectionClass::getStaticProperties() retains \0 in key
   names). (Ilia)
+- Fixed bug #37564 (AES privacy encryption not possible due to net-snmp 5.2
+  compatibility issue). (Jani, patch by scott dot moynes+php at gmail dot com)
 
 24 Jul 2006, PHP 5.2.0RC1
 - Updated bundled MySQL client library to version 5.0.22 in the Windows

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