thetaphi Fri Mar 20 15:54:36 2009 UTC
Modified files: (Branch: PHP_5_2)
/php-src/sapi/nsapi nsapi.c
Log:
Fix a sigsegv on server shutdown, add missing sapi_shutdown().
http://cvs.php.net/viewvc.cgi/php-src/sapi/nsapi/nsapi.c?r1=1.69.2.3.2.17&r2=1.69.2.3.2.18&diff_format=u
Index: php-src/sapi/nsapi/nsapi.c
diff -u php-src/sapi/nsapi/nsapi.c:1.69.2.3.2.17
php-src/sapi/nsapi/nsapi.c:1.69.2.3.2.18
--- php-src/sapi/nsapi/nsapi.c:1.69.2.3.2.17 Wed Feb 25 19:52:06 2009
+++ php-src/sapi/nsapi/nsapi.c Fri Mar 20 15:54:36 2009
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: nsapi.c,v 1.69.2.3.2.17 2009/02/25 19:52:06 thetaphi Exp $ */
+/* $Id: nsapi.c,v 1.69.2.3.2.18 2009/03/20 15:54:36 thetaphi Exp $ */
/*
* PHP includes
@@ -294,7 +294,7 @@
PHP_MINFO_FUNCTION(nsapi)
{
php_info_print_table_start();
- php_info_print_table_row(2, "NSAPI Module Revision", "$Revision:
1.69.2.3.2.17 $");
+ php_info_print_table_row(2, "NSAPI Module Revision", "$Revision:
1.69.2.3.2.18 $");
php_info_print_table_row(2, "Server Software", system_version());
php_info_print_table_row(2, "Sub-requests with nsapi_virtual()",
(nsapi_servact_service)?((zend_ini_long("zlib.output_compression",
sizeof("zlib.output_compression"), 0))?"not supported with
zlib.output_compression":"enabled"):"not supported on this platform" );
@@ -455,6 +455,11 @@
{
nsapi_request_context *rc = (nsapi_request_context *)server_context;
TSRMLS_FETCH();
+
+ if (!rc) {
+ /* we have no context, so no flushing needed. This fixes a
SIGSEGV on shutdown */
+ return;
+ }
if (!SG(headers_sent)) {
sapi_send_headers(TSRMLS_C);
@@ -826,6 +831,7 @@
}
#endif
+ sapi_shutdown();
tsrm_shutdown();
log_error(LOG_INFORM, "php5_close", NULL, NULL, "Shutdown PHP Module");
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php