r430 - in trunk/varnish-cache: include lib/libvcl
phk at projects.linpro.no
phk at projects.linpro.no
Tue Jul 11 18:03:25 CEST 2006
Author: phk
Date: 2006-07-11 18:03:25 +0200 (Tue, 11 Jul 2006)
New Revision: 430
Modified:
trunk/varnish-cache/include/vcl_returns.h
trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c
trunk/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl
trunk/varnish-cache/lib/libvcl/vcl_token_defs.h
Log:
Add "insert_pass" action in VCL
Modified: trunk/varnish-cache/include/vcl_returns.h
===================================================================
--- trunk/varnish-cache/include/vcl_returns.h 2006-07-11 15:54:05 UTC (rev 429)
+++ trunk/varnish-cache/include/vcl_returns.h 2006-07-11 16:03:25 UTC (rev 430)
@@ -13,26 +13,28 @@
VCL_RET_MAC(lookup, LOOKUP, (1 << 1))
VCL_RET_MAC(pipe, PIPE, (1 << 2))
VCL_RET_MAC(pass, PASS, (1 << 3))
-VCL_RET_MAC(fetch, FETCH, (1 << 4))
-VCL_RET_MAC(insert, INSERT, (1 << 5))
-VCL_RET_MAC(deliver, DELIVER, (1 << 6))
-VCL_RET_MAC(discard, DISCARD, (1 << 7))
+VCL_RET_MAC(insert_pass, INSERT_PASS, (1 << 4))
+VCL_RET_MAC(fetch, FETCH, (1 << 5))
+VCL_RET_MAC(insert, INSERT, (1 << 6))
+VCL_RET_MAC(deliver, DELIVER, (1 << 7))
+VCL_RET_MAC(discard, DISCARD, (1 << 8))
#else
#define VCL_RET_ERROR (1 << 0)
#define VCL_RET_LOOKUP (1 << 1)
#define VCL_RET_PIPE (1 << 2)
#define VCL_RET_PASS (1 << 3)
-#define VCL_RET_FETCH (1 << 4)
-#define VCL_RET_INSERT (1 << 5)
-#define VCL_RET_DELIVER (1 << 6)
-#define VCL_RET_DISCARD (1 << 7)
-#define VCL_RET_MAX 8
+#define VCL_RET_INSERT_PASS (1 << 4)
+#define VCL_RET_FETCH (1 << 5)
+#define VCL_RET_INSERT (1 << 6)
+#define VCL_RET_DELIVER (1 << 7)
+#define VCL_RET_DISCARD (1 << 8)
+#define VCL_RET_MAX 9
#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(miss,MISS,(VCL_RET_ERROR|VCL_RET_PASS|VCL_RET_PIPE|VCL_RET_FETCH))
VCL_MET_MAC(hit,HIT,(VCL_RET_ERROR|VCL_RET_PASS|VCL_RET_PIPE|VCL_RET_DELIVER))
-VCL_MET_MAC(fetch,FETCH,(VCL_RET_ERROR|VCL_RET_PASS|VCL_RET_PIPE|VCL_RET_INSERT))
+VCL_MET_MAC(fetch,FETCH,(VCL_RET_ERROR|VCL_RET_PASS|VCL_RET_PIPE|VCL_RET_INSERT|VCL_RET_INSERT_PASS))
VCL_MET_MAC(timeout,TIMEOUT,(VCL_RET_FETCH|VCL_RET_DISCARD))
#endif
Modified: trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c 2006-07-11 15:54:05 UTC (rev 429)
+++ trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c 2006-07-11 16:03:25 UTC (rev 430)
@@ -230,6 +230,13 @@
return (0);
case 'i':
if (p[0] == 'i' && p[1] == 'n' && p[2] == 's' &&
+ p[3] == 'e' && p[4] == 'r' && p[5] == 't' &&
+ p[6] == '_' && p[7] == 'p' && p[8] == 'a' &&
+ p[9] == 's' && p[10] == 's' && !isvar(p[11])) {
+ *q = p + 11;
+ return (T_INSERT_PASS);
+ }
+ if (p[0] == 'i' && p[1] == 'n' && p[2] == 's' &&
p[3] == 'e' && p[4] == 'r' && p[5] == 't'
&& !isvar(p[6])) {
*q = p + 6;
@@ -393,6 +400,7 @@
vcl_tnames[T_INC] = "++";
vcl_tnames[T_INCR] = "+=";
vcl_tnames[T_INSERT] = "insert";
+ vcl_tnames[T_INSERT_PASS] = "insert_pass";
vcl_tnames[T_LEQ] = "<=";
vcl_tnames[T_LOOKUP] = "lookup";
vcl_tnames[T_MUL] = "*=";
@@ -418,10 +426,11 @@
fputs("#define VCL_RET_LOOKUP (1 << 1)\n", f);
fputs("#define VCL_RET_PIPE (1 << 2)\n", f);
fputs("#define VCL_RET_PASS (1 << 3)\n", f);
- fputs("#define VCL_RET_FETCH (1 << 4)\n", f);
- fputs("#define VCL_RET_INSERT (1 << 5)\n", f);
- fputs("#define VCL_RET_DELIVER (1 << 6)\n", f);
- fputs("#define VCL_RET_DISCARD (1 << 7)\n", f);
+ fputs("#define VCL_RET_INSERT_PASS (1 << 4)\n", f);
+ fputs("#define VCL_RET_FETCH (1 << 5)\n", f);
+ fputs("#define VCL_RET_INSERT (1 << 6)\n", f);
+ fputs("#define VCL_RET_DELIVER (1 << 7)\n", f);
+ fputs("#define VCL_RET_DISCARD (1 << 8)\n", f);
fputs("/*\n", f);
fputs(" * $Id$\n", f);
fputs(" *\n", f);
Modified: trunk/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl 2006-07-11 15:54:05 UTC (rev 429)
+++ trunk/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl 2006-07-11 16:03:25 UTC (rev 430)
@@ -10,7 +10,7 @@
{recv {error pass pipe lookup}}
{miss {error pass pipe fetch}}
{hit {error pass pipe deliver}}
- {fetch {error pass pipe insert}}
+ {fetch {error pass pipe insert insert_pass}}
{timeout {fetch discard}}
}
@@ -21,6 +21,7 @@
lookup
pipe
pass
+ insert_pass
fetch
insert
deliver
Modified: trunk/varnish-cache/lib/libvcl/vcl_token_defs.h
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcl_token_defs.h 2006-07-11 15:54:05 UTC (rev 429)
+++ trunk/varnish-cache/lib/libvcl/vcl_token_defs.h 2006-07-11 16:03:25 UTC (rev 430)
@@ -26,27 +26,28 @@
#define T_LOOKUP 144
#define T_PIPE 145
#define T_PASS 146
-#define T_FETCH 147
-#define T_INSERT 148
-#define T_DELIVER 149
-#define T_DISCARD 150
-#define T_INC 151
-#define T_DEC 152
-#define T_CAND 153
-#define T_COR 154
-#define T_LEQ 155
-#define T_EQ 156
-#define T_NEQ 157
-#define T_GEQ 158
-#define T_SHR 159
-#define T_SHL 160
-#define T_INCR 161
-#define T_DECR 162
-#define T_MUL 163
-#define T_DIV 164
-#define ID 165
-#define VAR 166
-#define CNUM 167
-#define CSTR 168
-#define EOI 169
-#define METHOD 170
+#define T_INSERT_PASS 147
+#define T_FETCH 148
+#define T_INSERT 149
+#define T_DELIVER 150
+#define T_DISCARD 151
+#define T_INC 152
+#define T_DEC 153
+#define T_CAND 154
+#define T_COR 155
+#define T_LEQ 156
+#define T_EQ 157
+#define T_NEQ 158
+#define T_GEQ 159
+#define T_SHR 160
+#define T_SHL 161
+#define T_INCR 162
+#define T_DECR 163
+#define T_MUL 164
+#define T_DIV 165
+#define ID 166
+#define VAR 167
+#define CNUM 168
+#define CSTR 169
+#define EOI 170
+#define METHOD 171
More information about the varnish-commit
mailing list