diff options
author | Joe Orton <jorton@php.net> | 2004-10-23 12:56:20 +0000 |
---|---|---|
committer | Joe Orton <jorton@php.net> | 2004-10-23 12:56:20 +0000 |
commit | 516a19f1ecf8afa987c85f408f6f2f7c20d362c7 (patch) | |
tree | 209db731d4b1f03ecbdc3c50c5255d874293c4f1 | |
parent | 07f84de680e2a3029a0e7d6e6aa118eae95d3ce8 (diff) | |
download | php-git-516a19f1ecf8afa987c85f408f6f2f7c20d362c7.tar.gz |
Fix the get_request_time implementation for the 2.0 SAPIs to return
seconds not microseconds and to use TSRM stuff correctly.
-rw-r--r-- | sapi/apache2filter/sapi_apache2.c | 7 | ||||
-rw-r--r-- | sapi/apache2handler/sapi_apache2.c | 10 |
2 files changed, 5 insertions, 12 deletions
diff --git a/sapi/apache2filter/sapi_apache2.c b/sapi/apache2filter/sapi_apache2.c index 99f8aa7853..ffc8dfbd5b 100644 --- a/sapi/apache2filter/sapi_apache2.c +++ b/sapi/apache2filter/sapi_apache2.c @@ -299,13 +299,10 @@ php_apache_disable_caching(ap_filter_t *f) return OK; } -static time_t -php_apache_sapi_get_request_time(void) +static time_t php_apache_sapi_get_request_time(TSRMLS_D) { - TSRMLS_FETCH(); php_struct *ctx = SG(server_context); - - return ctx->r->request_time; + return apr_time_sec(ctx->r->request_time); } extern zend_module_entry php_apache_module; diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c index 66583b3edf..354ab96716 100644 --- a/sapi/apache2handler/sapi_apache2.c +++ b/sapi/apache2handler/sapi_apache2.c @@ -277,13 +277,9 @@ static void php_apache_sapi_log_message_ex(char *msg, request_rec *r) } } -static time_t php_apache_sapi_get_request_time(void) { - php_struct *ctx; - TSRMLS_FETCH(); - - ctx = SG(server_context); - - return ctx->r->request_time; +static time_t php_apache_sapi_get_request_time(TSRMLS_D) { + php_struct *ctx = SG(server_context); + return apr_time_sec(ctx->r->request_time); } extern zend_module_entry php_apache_module; |