cvs: php-src(PHP_5_1) / NEWS /ext/standard basic_functions.c php_ext_syslog.h syslog.c

From: Date: Mon, 20 Mar 2006 23:03:11 +0000
Subject: cvs: php-src(PHP_5_1) / NEWS /ext/standard basic_functions.c php_ext_syslog.h syslog.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-37368@lists.php.net to get a copy of this message
tony2001 Mon Mar 20 23:03:11 2006 UTC Modified files: (Branch: PHP_5_1) /php-src/ext/standard basic_functions.c php_ext_syslog.h syslog.c /php-src NEWS Log: fix #36808 (syslog ident becomes garbage between requests) http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.25&r2=1.725.2.26&diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.725.2.25 php-src/ext/standard/basic_functions.c:1.725.2.26 --- php-src/ext/standard/basic_functions.c:1.725.2.25 Sun Mar 5 18:57:54 2006 +++ php-src/ext/standard/basic_functions.c Mon Mar 20 23:03:11 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: basic_functions.c,v 1.725.2.25 2006/03/05 18:57:54 derick Exp $ */ +/* $Id: basic_functions.c,v 1.725.2.26 2006/03/20 23:03:11 tony2001 Exp $ */ #include "php.h" #include "php_streams.h" @@ -1150,6 +1150,7 @@ PHP_MSHUTDOWN(url_scanner_ex)(SHUTDOWN_FUNC_ARGS_PASSTHRU); PHP_MSHUTDOWN(file)(SHUTDOWN_FUNC_ARGS_PASSTHRU); PHP_MSHUTDOWN(standard_filters)(SHUTDOWN_FUNC_ARGS_PASSTHRU); + PHP_MSHUTDOWN(syslog)(INIT_FUNC_ARGS_PASSTHRU); #if defined(HAVE_LOCALECONV) && defined(ZTS) PHP_MSHUTDOWN(localeconv)(SHUTDOWN_FUNC_ARGS_PASSTHRU); #endif http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/php_ext_syslog.h?r1=1.12.2.1&r2=1.12.2.2&diff_format=u Index: php-src/ext/standard/php_ext_syslog.h diff -u php-src/ext/standard/php_ext_syslog.h:1.12.2.1 php-src/ext/standard/php_ext_syslog.h:1.12.2.2 --- php-src/ext/standard/php_ext_syslog.h:1.12.2.1 Sun Jan 1 12:50:15 2006 +++ php-src/ext/standard/php_ext_syslog.h Mon Mar 20 23:03:11 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_ext_syslog.h,v 1.12.2.1 2006/01/01 12:50:15 sniper Exp $ */ +/* $Id: php_ext_syslog.h,v 1.12.2.2 2006/03/20 23:03:11 tony2001 Exp $ */ #ifndef PHP_EXT_SYSLOG_H #define PHP_EXT_SYSLOG_H @@ -28,6 +28,7 @@ PHP_MINIT_FUNCTION(syslog); PHP_RINIT_FUNCTION(syslog); PHP_RSHUTDOWN_FUNCTION(syslog); +PHP_MSHUTDOWN_FUNCTION(syslog); PHP_FUNCTION(openlog); PHP_FUNCTION(syslog); http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/syslog.c?r1=1.49.2.1&r2=1.49.2.2&diff_format=u Index: php-src/ext/standard/syslog.c diff -u php-src/ext/standard/syslog.c:1.49.2.1 php-src/ext/standard/syslog.c:1.49.2.2 --- php-src/ext/standard/syslog.c:1.49.2.1 Sun Jan 1 12:50:15 2006 +++ php-src/ext/standard/syslog.c Mon Mar 20 23:03:11 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: syslog.c,v 1.49.2.1 2006/01/01 12:50:15 sniper Exp $ */ +/* $Id: syslog.c,v 1.49.2.2 2006/03/20 23:03:11 tony2001 Exp $ */ #include "php.h" @@ -97,6 +97,7 @@ /* AIX doesn't have LOG_PERROR */ REGISTER_LONG_CONSTANT("LOG_PERROR", LOG_PERROR, CONST_CS | CONST_PERSISTENT); /*log to stderr*/ #endif + BG(syslog_device)=NULL; return SUCCESS; } @@ -109,22 +110,26 @@ } else { BG(syslog_started)=0; } - BG(syslog_device)=NULL; return SUCCESS; } PHP_RSHUTDOWN_FUNCTION(syslog) { - if (BG(syslog_device)) { - efree(BG(syslog_device)); - } #ifdef PHP_WIN32 closelog(); #endif return SUCCESS; } +PHP_MSHUTDOWN_FUNCTION(syslog) +{ + if (BG(syslog_device)) { + free(BG(syslog_device)); + } + return SUCCESS; +} + /* {{{ start_syslog */ static void start_syslog(TSRMLS_D) @@ -224,9 +229,9 @@ return; } if (BG(syslog_device)) { - efree(BG(syslog_device)); + free(BG(syslog_device)); } - BG(syslog_device) = estrndup(ident, ident_len); + BG(syslog_device) = zend_strndup(ident, ident_len); openlog(BG(syslog_device), option, facility); RETURN_TRUE; } @@ -242,7 +247,7 @@ closelog(); if (BG(syslog_device)) { - efree(BG(syslog_device)); + free(BG(syslog_device)); BG(syslog_device)=NULL; } RETURN_TRUE; http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2027.2.470&r2=1.2027.2.471&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.470 php-src/NEWS:1.2027.2.471 --- php-src/NEWS:1.2027.2.470 Sun Mar 19 15:19:08 2006 +++ php-src/NEWS Mon Mar 20 23:03:11 2006 @@ -10,6 +10,7 @@ (also fixes bug #36764). (Tony) - Removed the E_STRICT deprecation notice from "var". (Ilia) - Fixed debug_zval_dump() to support private and protected members. (Dmitry) +- FIxed bug #36808 (syslog ident becomes garbage between requests). (Tony) - Fixed bug #36756 (DOMDocument::removeChild corrupts node). (Rob) - Fixed bug #36743 (In a class extending XMLReader array properties are not writable). (Tony)

« previous php.cvs (#37368) next »