r2737 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Fri Jun 20 09:32:40 CEST 2008


Author: phk
Date: 2008-06-20 09:32:38 +0200 (Fri, 20 Jun 2008)
New Revision: 2737

Modified:
   trunk/varnish-cache/bin/varnishd/cache.h
   trunk/varnish-cache/bin/varnishd/cache_expire.c
   trunk/varnish-cache/bin/varnishd/cache_hash.c
Log:
Use default_grace consistently or it will all be in vain.

Submitted by:	sky
Fixes:	ticket 253



Modified: trunk/varnish-cache/bin/varnishd/cache.h
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache.h	2008-06-20 06:56:03 UTC (rev 2736)
+++ trunk/varnish-cache/bin/varnishd/cache.h	2008-06-20 07:32:38 UTC (rev 2737)
@@ -462,6 +462,7 @@
 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 */

Modified: trunk/varnish-cache/bin/varnishd/cache_expire.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_expire.c	2008-06-20 06:56:03 UTC (rev 2736)
+++ trunk/varnish-cache/bin/varnishd/cache_expire.c	2008-06-20 07:32:38 UTC (rev 2737)
@@ -147,7 +147,7 @@
 		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;
 	}
 }

Modified: trunk/varnish-cache/bin/varnishd/cache_hash.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_hash.c	2008-06-20 06:56:03 UTC (rev 2736)
+++ trunk/varnish-cache/bin/varnishd/cache_hash.c	2008-06-20 07:32:38 UTC (rev 2737)
@@ -67,7 +67,7 @@
 
 static struct hash_slinger      *hash;
 
-static double
+double
 HSH_Grace(double g)
 {
 	if (isnan(g))




More information about the varnish-commit mailing list