httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stodd...@apache.org
Subject cvs commit: httpd-2.0/modules/experimental mod_cache.c
Date Sat, 23 Feb 2002 19:31:02 GMT
stoddard    02/02/23 11:31:02

  Modified:    modules/experimental mod_cache.c
  Log:
  Fix problem where expiry time was being set in the past when the cache was
  loaded.
  
  Revision  Changes    Path
  1.29      +4 -5      httpd-2.0/modules/experimental/mod_cache.c
  
  Index: mod_cache.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_cache.c,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- mod_cache.c	13 Feb 2002 15:25:39 -0000	1.28
  +++ mod_cache.c	23 Feb 2002 19:31:02 -0000	1.29
  @@ -696,11 +696,10 @@
                    "cache: Expiry date is %ld", (long)exp);
       if (exp == APR_DATE_BAD) {
           if (lastmod != APR_DATE_BAD) {
  -            double x = (double) (date - lastmod) * conf->factor;
  -            double maxex = (double)conf->maxex;
  -            if (x > maxex)
  -                x = maxex;
  -            exp = now + (int) x;
  +            apr_time_t x = (apr_time_t) ((date - lastmod) * conf->factor);
  +            if (x > conf->maxex)
  +                x = conf->maxex;
  +            exp = now + x;
           }
           else
               exp = now + conf->defex;
  
  
  

Mime
View raw message