diff options
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/odbc/php_odbc.c | 10 | ||||
| -rw-r--r-- | ext/session/session.c | 29 |
2 files changed, 24 insertions, 15 deletions
diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index aaa31503fc..a8944fb06b 100644 --- a/ext/odbc/php_odbc.c +++ b/ext/odbc/php_odbc.c @@ -410,7 +410,9 @@ PHP_MINIT_FUNCTION(odbc) return SUCCESS; } -void _php_odbc_shutdown(void *data) + +#if 0 +static void _php_odbc_shutdown(void *data) { ELS_FETCH(); @@ -421,6 +423,8 @@ void _php_odbc_shutdown(void *data) zend_hash_apply(&EG(regular_list), (int (*)(void *)) _odbc_stmt_cleanup); } +#endif + PHP_RINIT_FUNCTION(odbc) { @@ -429,7 +433,9 @@ PHP_RINIT_FUNCTION(odbc) ODBCG(defConn) = -1; ODBCG(num_links) = ODBCG(num_persistent); - php_register_pre_request_shutdown(_php_odbc_shutdown, NULL); + /* This should no longer be necessary, as hash_apply() is reentrant + * php_register_pre_request_shutdown(_php_odbc_shutdown, NULL); + */ return SUCCESS; } diff --git a/ext/session/session.c b/ext/session/session.c index 5d7bdb77a2..4608e8e49e 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -101,6 +101,7 @@ const static ps_serializer ps_serializers[] = { PHP_MINIT_FUNCTION(session); PHP_RINIT_FUNCTION(session); PHP_MSHUTDOWN_FUNCTION(session); +PHP_RSHUTDOWN_FUNCTION(session); PHP_MINFO_FUNCTION(session); static void php_rinit_session_globals(PSLS_D); @@ -110,7 +111,7 @@ zend_module_entry session_module_entry = { "Session Management", session_functions, PHP_MINIT(session), PHP_MSHUTDOWN(session), - PHP_RINIT(session), NULL, + PHP_RINIT(session), PHP_RSHUTDOWN(session), PHP_MINFO(session), STANDARD_MODULE_PROPERTIES, }; @@ -1178,17 +1179,6 @@ static void php_rshutdown_session_globals(PSLS_D) } -void _php_session_shutdown(void *data) -{ - PSLS_FETCH(); - - if(PS(nr_open_sessions) > 0) { - _php_session_save_current_state(PSLS_C); - PS(nr_open_sessions)--; - } - php_rshutdown_session_globals(PSLS_C); -} - PHP_RINIT_FUNCTION(session) { PSLS_FETCH(); @@ -1206,11 +1196,24 @@ PHP_RINIT_FUNCTION(session) _php_session_start(PSLS_C); } - php_register_pre_request_shutdown(_php_session_shutdown, NULL); + return SUCCESS; +} + +PHP_RSHUTDOWN_FUNCTION(session) +{ + PSLS_FETCH(); + + if(PS(nr_open_sessions) > 0) { + _php_session_save_current_state(PSLS_C); + PS(nr_open_sessions)--; + } + php_rshutdown_session_globals(PSLS_C); return SUCCESS; } + + PHP_MINIT_FUNCTION(session) { #ifdef ZTS |
