From: William A. Rowe Jr Date: Fri, 2 Jul 2010 18:02:27 +0000 (+0000) Subject: Fix nasty dbm bug that wasn't expiring records; time() doesn't return apr_time_t X-Git-Tag: 2.3.7~106 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=de541c91844198a5233796534d150dabfe997b9c;p=apache 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 --- 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,