summaryrefslogtreecommitdiffstats
path: root/modules/cache/mod_socache_dbm.c
diff options
context:
space:
mode:
authorWilliam A. Rowe Jr <wrowe@apache.org>2010-07-02 20:02:27 +0200
committerWilliam A. Rowe Jr <wrowe@apache.org>2010-07-02 20:02:27 +0200
commitde541c91844198a5233796534d150dabfe997b9c (patch)
treed6d87d14fd3bf34735820204ded5274bdf129c32 /modules/cache/mod_socache_dbm.c
parentClean shmcb iterator call syntax and return value (diff)
downloadapache2-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.c7
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,