From de541c91844198a5233796534d150dabfe997b9c Mon Sep 17 00:00:00 2001 From: "William A. Rowe Jr" Date: Fri, 2 Jul 2010 18:02:27 +0000 Subject: [PATCH] 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 --- modules/cache/mod_socache_dbm.c | 7 +++---- 1 file 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, -- 2.50.1