Commit 066cf506 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Add "restart" action for most VCL methods.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2065 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 761aa841
......@@ -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
......
......@@ -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");
......
......@@ -34,14 +34,14 @@
# 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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment