]> err.no Git - varnish/commitdiff
Use default_grace consistently or it will all be in vain.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 20 Jun 2008 07:32:38 +0000 (07:32 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 20 Jun 2008 07:32:38 +0000 (07:32 +0000)
Submitted by: sky
Fixes: ticket 253

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2737 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache.h
varnish-cache/bin/varnishd/cache_expire.c
varnish-cache/bin/varnishd/cache_hash.c

index d572f008a3ceddc1d56e971112a0a7aea55bf906..b138a1a45ea7f318cd9397abb63e41ab72cb2b5a 100644 (file)
@@ -462,6 +462,7 @@ struct object *HSH_Lookup(struct sess *sp);
 void HSH_Unbusy(struct sess *sp);
 void HSH_Ref(struct object *o);
 void HSH_Deref(struct object *o);
+double HSH_Grace(double g);
 void HSH_Init(void);
 
 /* cache_http.c */
index c3762bfd0770d4b832189d12b78eb7559af8296e..245fc0c87861f8e84eb3e62e3fd5e3aa0ee51fa2 100644 (file)
@@ -147,7 +147,7 @@ update_object_when(const struct object *o)
                oe->timer_when = o->prefetch;
                oe->timer_what = tmr_prefetch;
        } else {
-               oe->timer_when = o->ttl + o->grace;
+               oe->timer_when = o->ttl + HSH_Grace(o->grace);
                oe->timer_what = tmr_ttl;
        }
 }
index 4f736ae22343213eccc341c6c0e499ac0ac87e68..46e00e6628c1585e741e6999bf53a0b06c7adeb6 100644 (file)
@@ -67,7 +67,7 @@
 
 static struct hash_slinger      *hash;
 
-static double
+double
 HSH_Grace(double g)
 {
        if (isnan(g))