httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r960074 - /httpd/httpd/trunk/modules/cache/mod_socache_dbm.c
Date Fri, 02 Jul 2010 18:02:28 GMT
Author: wrowe
Date: Fri Jul  2 18:02:27 2010
New Revision: 960074

URL: http://svn.apache.org/viewvc?rev=960074&view=rev
Log:
Fix nasty dbm bug that wasn't expiring records; time() doesn't return apr_time_t

Modified:
    httpd/httpd/trunk/modules/cache/mod_socache_dbm.c

Modified: httpd/httpd/trunk/modules/cache/mod_socache_dbm.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/mod_socache_dbm.c?rev=960074&r1=960073&r2=960074&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/cache/mod_socache_dbm.c (original)
+++ httpd/httpd/trunk/modules/cache/mod_socache_dbm.c Fri Jul  2 18:02:27 2010
@@ -369,7 +369,7 @@ static void socache_dbm_expire(ap_socach
      * 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(
     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,



Mime
View raw message