From: phk Date: Fri, 10 Oct 2008 08:32:24 +0000 (+0000) Subject: Add 'w' suffix for "week" in time units. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eeab67b9746dd1c4c9f9b904fb84179b6190215a;p=varnish 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 --- 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);