r3275 - trunk/varnish-cache/lib/libvcl

phk at projects.linpro.no phk at projects.linpro.no
Fri Oct 10 10:32:24 CEST 2008


Author: phk
Date: 2008-10-10 10:32:24 +0200 (Fri, 10 Oct 2008)
New Revision: 3275

Modified:
   trunk/varnish-cache/lib/libvcl/vcc_parse.c
Log:
Add 'w' suffix for "week" in time units.

Suggested by:	 "chen xiaoyong"



Modified: trunk/varnish-cache/lib/libvcl/vcc_parse.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_parse.c	2008-10-09 20:31:32 UTC (rev 3274)
+++ trunk/varnish-cache/lib/libvcl/vcc_parse.c	2008-10-10 08:32:24 UTC (rev 3275)
@@ -79,6 +79,8 @@
 		sc = 60.0 * 60.0;
 	else if (vcc_IdIs(tl->t, "d"))
 		sc = 60.0 * 60.0 * 24.0;
+	else if (vcc_IdIs(tl->t, "w"))
+		sc = 60.0 * 60.0 * 24.0 * 7.0;
 	else {
 		vsb_printf(tl->sb, "Unknown time unit ");
 		vcc_ErrToken(tl, tl->t);




More information about the varnish-commit mailing list