]> err.no Git - varnish/commitdiff
Add 'w' suffix for "week" in time units.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 10 Oct 2008 08:32:24 +0000 (08:32 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 10 Oct 2008 08:32:24 +0000 (08:32 +0000)
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

index cc5cb32a0bf736c4d65048ca933899b300e3654c..cbea1dbcc12b88a178200ef83425d8b68ce14e31 100644 (file)
@@ -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);