cvs: ZendEngine2 / zend.c zend_ini.c

From: Date: Wed, 08 Nov 2006 11:04:43 +0000
Subject: cvs: ZendEngine2 / zend.c zend_ini.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-5370@lists.php.net to get a copy of this message
dmitry Wed Nov 8 11:04:43 2006 UTC Modified files: /ZendEngine2 zend.c zend_ini.c Log: Fixed bug #39344 (Unnecessary calls to OnModify callback routine for an extension INI directive). (wharmby at uk dot ibm dot com, Dmitry) http://cvs.php.net/viewvc.cgi/ZendEngine2/zend.c?r1=1.381&r2=1.382&diff_format=u Index: ZendEngine2/zend.c diff -u ZendEngine2/zend.c:1.381 ZendEngine2/zend.c:1.382 --- ZendEngine2/zend.c:1.381 Tue Oct 31 19:21:03 2006 +++ ZendEngine2/zend.c Wed Nov 8 11:04:42 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend.c,v 1.381 2006/10/31 19:21:03 helly Exp $ */ +/* $Id: zend.c,v 1.382 2006/11/08 11:04:42 dmitry Exp $ */ #include "zend.h" #include "zend_extensions.h" @@ -900,8 +900,9 @@ static void zend_new_thread_end_handler(THREAD_T thread_id TSRMLS_DC) { - zend_copy_ini_directives(TSRMLS_C); - zend_ini_refresh_caches(ZEND_INI_STAGE_STARTUP TSRMLS_CC); + if (zend_copy_ini_directives(TSRMLS_C) == SUCCESS) { + zend_ini_refresh_caches(ZEND_INI_STAGE_STARTUP TSRMLS_CC); + } } #endif @@ -1178,7 +1179,7 @@ free(EG(zend_constants)); executor_globals_ctor(executor_globals, tsrm_ls); global_persistent_list = &EG(persistent_list); - zend_new_thread_end_handler(tsrm_thread_id() TSRMLS_CC); + zend_copy_ini_directives(TSRMLS_C); #endif } http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_ini.c?r1=1.48&r2=1.49&diff_format=u Index: ZendEngine2/zend_ini.c diff -u ZendEngine2/zend_ini.c:1.48 ZendEngine2/zend_ini.c:1.49 --- ZendEngine2/zend_ini.c:1.48 Wed Sep 6 08:54:57 2006 +++ ZendEngine2/zend_ini.c Wed Nov 8 11:04:42 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_ini.c,v 1.48 2006/09/06 08:54:57 dmitry Exp $ */ +/* $Id: zend_ini.c,v 1.49 2006/11/08 11:04:42 dmitry Exp $ */ #include "zend.h" #include "zend_qsort.h" @@ -126,7 +126,6 @@ return FAILURE; } zend_hash_copy(EG(ini_directives), registered_zend_ini_directives, NULL, &ini_entry, sizeof(zend_ini_entry)); - zend_ini_refresh_caches(ZEND_INI_STAGE_STARTUP TSRMLS_CC); return SUCCESS; } #endif @@ -215,6 +214,7 @@ } +#ifdef ZTS static int zend_ini_refresh_cache(zend_ini_entry *p, int stage TSRMLS_DC) { if (p->on_modify) { @@ -228,6 +228,7 @@ { zend_hash_apply_with_argument(EG(ini_directives), (apply_func_arg_t) zend_ini_refresh_cache, (void *)(long) stage TSRMLS_CC); } +#endif ZEND_API int zend_alter_ini_entry(char *name, uint name_length, char *new_value, uint new_value_length, int modify_type, int stage)

« previous php.zend-engine.cvs (#5370) next »