From 34b631f6799a9fc81980f3027865b6258452df43 Mon Sep 17 00:00:00 2001 From: Kalle Sommer Nielsen Date: Wed, 18 Aug 2010 13:34:40 +0000 Subject: Pass the TSRMS pointers to sapi_module_struct.log_message, this saves some TSRMLS_FETCH() calls in a few of our SAPI's --- sapi/apache2handler/sapi_apache2.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'sapi/apache2handler/sapi_apache2.c') diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c index ae757f5702..f8eb2d47ea 100644 --- a/sapi/apache2handler/sapi_apache2.c +++ b/sapi/apache2handler/sapi_apache2.c @@ -313,10 +313,9 @@ php_apache_sapi_flush(void *server_context) } } -static void php_apache_sapi_log_message(char *msg) +static void php_apache_sapi_log_message(char *msg TSRMLS_DC) { php_struct *ctx; - TSRMLS_FETCH(); ctx = SG(server_context); @@ -327,12 +326,12 @@ static void php_apache_sapi_log_message(char *msg) } } -static void php_apache_sapi_log_message_ex(char *msg, request_rec *r) +static void php_apache_sapi_log_message_ex(char *msg, request_rec *r TSRMLS_DC) { if (r) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, msg, r->filename); } else { - php_apache_sapi_log_message(msg); + php_apache_sapi_log_message(msg TSRMLS_CC); } } @@ -589,12 +588,12 @@ normal: } if (r->finfo.filetype == 0) { - php_apache_sapi_log_message_ex("script '%s' not found or unable to stat", r); + php_apache_sapi_log_message_ex("script '%s' not found or unable to stat", r TSRMLS_CC); PHPAP_INI_OFF; return HTTP_NOT_FOUND; } if (r->finfo.filetype == APR_DIR) { - php_apache_sapi_log_message_ex("attempt to invoke directory '%s' as script", r); + php_apache_sapi_log_message_ex("attempt to invoke directory '%s' as script", r TSRMLS_CC); PHPAP_INI_OFF; return HTTP_FORBIDDEN; } -- cgit v1.2.1