From eeab67b9746dd1c4c9f9b904fb84179b6190215a Mon Sep 17 00:00:00 2001 From: phk Date: Fri, 10 Oct 2008 08:32:24 +0000 Subject: [PATCH] Add 'w' suffix for "week" in time units. Suggested by: "chen xiaoyong" git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3275 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/lib/libvcl/vcc_parse.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/varnish-cache/lib/libvcl/vcc_parse.c b/varnish-cache/lib/libvcl/vcc_parse.c index cc5cb32a..cbea1dbc 100644 --- a/varnish-cache/lib/libvcl/vcc_parse.c +++ b/varnish-cache/lib/libvcl/vcc_parse.c @@ -79,6 +79,8 @@ TimeUnit(struct tokenlist *tl) 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); -- 2.39.5