]> err.no Git - varnish/commitdiff
Add "restart" action for most VCL methods.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 30 Sep 2007 20:36:16 +0000 (20:36 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 30 Sep 2007 20:36:16 +0000 (20:36 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2065 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/include/vcl_returns.h
varnish-cache/lib/libvcl/vcc_fixed_token.c
varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl

index 4f3f53a98b34f65741f60577287b8b7757e5dd96..76ad3f6af15d1ea62e40100e90a4c30afccdebbe 100644 (file)
@@ -19,6 +19,7 @@ VCL_RET_MAC(insert, INSERT, (1 << 6), 6)
 VCL_RET_MAC(deliver, DELIVER, (1 << 7), 7)
 VCL_RET_MAC(discard, DISCARD, (1 << 8), 8)
 VCL_RET_MAC(keep, KEEP, (1 << 9), 9)
+VCL_RET_MAC(restart, RESTART, (1 << 10), 10)
 #else
 #define VCL_RET_ERROR  (1 << 0)
 #define VCL_RET_LOOKUP  (1 << 1)
@@ -30,18 +31,19 @@ VCL_RET_MAC(keep, KEEP, (1 << 9), 9)
 #define VCL_RET_DELIVER  (1 << 7)
 #define VCL_RET_DISCARD  (1 << 8)
 #define VCL_RET_KEEP  (1 << 9)
-#define VCL_RET_MAX 10
+#define VCL_RET_RESTART  (1 << 10)
+#define VCL_RET_MAX 11
 #endif
 
 #ifdef VCL_MET_MAC
-VCL_MET_MAC(recv,RECV,(VCL_RET_ERROR|VCL_RET_PASS|VCL_RET_PIPE|VCL_RET_LOOKUP))
-VCL_MET_MAC(pipe,PIPE,(VCL_RET_ERROR|VCL_RET_PIPE))
-VCL_MET_MAC(pass,PASS,(VCL_RET_ERROR|VCL_RET_PASS))
+VCL_MET_MAC(recv,RECV,(VCL_RET_ERROR|VCL_RET_RESTART|VCL_RET_PASS|VCL_RET_PIPE|VCL_RET_LOOKUP))
+VCL_MET_MAC(pipe,PIPE,(VCL_RET_ERROR|VCL_RET_RESTART|VCL_RET_PIPE))
+VCL_MET_MAC(pass,PASS,(VCL_RET_ERROR|VCL_RET_RESTART|VCL_RET_PASS))
 VCL_MET_MAC(hash,HASH,(VCL_RET_HASH))
-VCL_MET_MAC(miss,MISS,(VCL_RET_ERROR|VCL_RET_PASS|VCL_RET_FETCH))
-VCL_MET_MAC(hit,HIT,(VCL_RET_ERROR|VCL_RET_PASS|VCL_RET_DELIVER))
-VCL_MET_MAC(fetch,FETCH,(VCL_RET_ERROR|VCL_RET_PASS|VCL_RET_INSERT))
-VCL_MET_MAC(deliver,DELIVER,(VCL_RET_ERROR|VCL_RET_DELIVER))
+VCL_MET_MAC(miss,MISS,(VCL_RET_ERROR|VCL_RET_RESTART|VCL_RET_PASS|VCL_RET_FETCH))
+VCL_MET_MAC(hit,HIT,(VCL_RET_ERROR|VCL_RET_RESTART|VCL_RET_PASS|VCL_RET_DELIVER))
+VCL_MET_MAC(fetch,FETCH,(VCL_RET_ERROR|VCL_RET_RESTART|VCL_RET_PASS|VCL_RET_INSERT))
+VCL_MET_MAC(deliver,DELIVER,(VCL_RET_ERROR|VCL_RET_RESTART|VCL_RET_DELIVER))
 VCL_MET_MAC(timeout,TIMEOUT,(VCL_RET_FETCH|VCL_RET_DISCARD))
 VCL_MET_MAC(discard,DISCARD,(VCL_RET_DISCARD|VCL_RET_KEEP))
 #else
index 7f0643c839cf341464dbb49c2cd542aa341491b4..3885cabc10869a9884ab1f006588cdaac2df615a 100644 (file)
@@ -330,6 +330,7 @@ vcl_output_lang_h(struct vsb *sb)
        vsb_cat(sb, "#define VCL_RET_DELIVER  (1 << 7)\n");
        vsb_cat(sb, "#define VCL_RET_DISCARD  (1 << 8)\n");
        vsb_cat(sb, "#define VCL_RET_KEEP  (1 << 9)\n");
+       vsb_cat(sb, "#define VCL_RET_RESTART  (1 << 10)\n");
        vsb_cat(sb, "/*\n");
        vsb_cat(sb, " * $Id$\n");
        vsb_cat(sb, " *\n");
index 8b04deb3d291b2dcbb5fc12c344ca1c245f0f3c4..578d70dbe973a97fa1d25bd32fdaae8a787acb63 100755 (executable)
 # Second element is list of valid return actions.
 #
 set methods {
-       {recv           {error pass pipe lookup}}
-       {pipe           {error pipe}}
-       {pass           {error pass}}
+       {recv           {error restart pass pipe lookup}}
+       {pipe           {error restart pipe}}
+       {pass           {error restart pass}}
        {hash           {hash}}
-       {miss           {error pass fetch}}
-       {hit            {error pass deliver}}
-       {fetch          {error pass insert}}
-       {deliver        {error deliver}}
+       {miss           {error restart pass fetch}}
+       {hit            {error restart pass deliver}}
+       {fetch          {error restart pass insert}}
+       {deliver        {error restart deliver}}
        {timeout        {fetch discard}}
        {discard        {discard keep}}
 }
@@ -59,6 +59,7 @@ set returns {
        deliver
        discard
        keep
+       restart
 }
 
 # Language keywords