]> granicus.if.org Git - apache/commitdiff
Fix nasty dbm bug that wasn't expiring records; time() doesn't return apr_time_t
authorWilliam A. Rowe Jr <wrowe@apache.org>
Fri, 2 Jul 2010 18:02:27 +0000 (18:02 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Fri, 2 Jul 2010 18:02:27 +0000 (18:02 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@960074 13f79535-47bb-0310-9956-ffa450edef68

modules/cache/mod_socache_dbm.c

index 728e1f1097a689cde393ee3bc33b71e2e60132a5..60e551de2a75851e4ecdf405e749fe09f08389f1 100644 (file)
@@ -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,