diff options
author | William A. Rowe Jr <wrowe@apache.org> | 2010-07-02 20:02:27 +0200 |
---|---|---|
committer | William A. Rowe Jr <wrowe@apache.org> | 2010-07-02 20:02:27 +0200 |
commit | de541c91844198a5233796534d150dabfe997b9c (patch) | |
tree | d6d87d14fd3bf34735820204ded5274bdf129c32 /modules/cache/mod_socache_dbm.c | |
parent | Clean shmcb iterator call syntax and return value (diff) | |
download | apache2-de541c91844198a5233796534d150dabfe997b9c.tar.xz apache2-de541c91844198a5233796534d150dabfe997b9c.zip |
Fix nasty dbm bug that wasn't expiring records; time() doesn't return apr_time_t
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@960074 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/cache/mod_socache_dbm.c')
-rw-r--r-- | modules/cache/mod_socache_dbm.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/modules/cache/mod_socache_dbm.c b/modules/cache/mod_socache_dbm.c index 728e1f1097..60e551de2a 100644 --- a/modules/cache/mod_socache_dbm.c +++ b/modules/cache/mod_socache_dbm.c @@ -369,7 +369,7 @@ static void socache_dbm_expire(ap_socache_instance_t *ctx, server_rec *s) * make sure the expiration for still not-accessed * socache entries is done only from time to time */ - now = time(NULL); + now = apr_time_now(); if (now < ctx->last_expiry + ctx->expiry_interval) { return; @@ -516,10 +516,9 @@ static apr_status_t socache_dbm_iterate(ap_socache_instance_t *ctx, apr_status_t rv; /* - * make sure the expiration for still not-accessed - * socache entries is done only from time to time + * make sure the expired records are omitted */ - now = time(NULL); + now = apr_time_now(); if ((rv = apr_dbm_open(&dbm, ctx->data_file, APR_DBM_RWCREATE, DBM_FILE_MODE, ctx->pool)) != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, |