Browse Source

Fix the get_request_time implementation for the 2.0 SAPIs to return

seconds not microseconds and to use TSRM stuff correctly.
PHP-5.1
Joe Orton 22 years ago
parent
commit
516a19f1ec
  1. 7
      sapi/apache2filter/sapi_apache2.c
  2. 10
      sapi/apache2handler/sapi_apache2.c

7
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;

10
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;

Loading…
Cancel
Save