thetaphi                Fri Apr 27 00:29:02 2007 UTC

  Modified files:              
    /php-src/sapi/nsapi nsapi.c 
  Log:
  Fix crash on server startup when log message is printed
  
http://cvs.php.net/viewvc.cgi/php-src/sapi/nsapi/nsapi.c?r1=1.82&r2=1.83&diff_format=u
Index: php-src/sapi/nsapi/nsapi.c
diff -u php-src/sapi/nsapi/nsapi.c:1.82 php-src/sapi/nsapi/nsapi.c:1.83
--- php-src/sapi/nsapi/nsapi.c:1.82     Tue Mar  6 19:47:12 2007
+++ php-src/sapi/nsapi/nsapi.c  Fri Apr 27 00:29:02 2007
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: nsapi.c,v 1.82 2007/03/06 19:47:12 thetaphi Exp $ */
+/* $Id: nsapi.c,v 1.83 2007/04/27 00:29:02 thetaphi Exp $ */
 
 /*
  * PHP includes
@@ -308,7 +308,7 @@
 PHP_MINFO_FUNCTION(nsapi)
 {
        php_info_print_table_start();
-       php_info_print_table_row(2, "NSAPI Module Revision", "$Revision: 1.82 
$");
+       php_info_print_table_row(2, "NSAPI Module Revision", "$Revision: 1.83 
$");
        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" );
@@ -705,7 +705,11 @@
        TSRMLS_FETCH();
        nsapi_request_context *rc = (nsapi_request_context *)SG(server_context);
 
-       log_error(LOG_INFORM, pblock_findval("fn", rc->pb), rc->sn, rc->rq, 
"%s", message);
+       if (rc) {
+               log_error(LOG_INFORM, pblock_findval("fn", rc->pb), rc->sn, 
rc->rq, "%s", message);
+       } else {
+               log_error(LOG_INFORM, "php6", NULL, NULL, "%s", message);
+       }
 }
 
 static time_t sapi_nsapi_get_request_time(TSRMLS_D)

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

Reply via email to