r2176 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Mon Oct 29 08:53:01 CET 2007


Author: phk
Date: 2007-10-29 08:53:01 +0100 (Mon, 29 Oct 2007)
New Revision: 2176

Modified:
   trunk/varnish-cache/bin/varnishd/cache.h
   trunk/varnish-cache/bin/varnishd/cache_vcl.c
Log:
Give VRT code a chance to see which method we are in.


Modified: trunk/varnish-cache/bin/varnishd/cache.h
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache.h	2007-10-29 07:46:12 UTC (rev 2175)
+++ trunk/varnish-cache/bin/varnishd/cache.h	2007-10-29 07:53:01 UTC (rev 2176)
@@ -311,6 +311,7 @@
 	double			t_end;
 
 	enum step		step;
+	unsigned		cur_method;
 	unsigned 		handling;
 	unsigned char		wantbody;
 	int			err_code;

Modified: trunk/varnish-cache/bin/varnishd/cache_vcl.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_vcl.c	2007-10-29 07:46:12 UTC (rev 2175)
+++ trunk/varnish-cache/bin/varnishd/cache_vcl.c	2007-10-29 07:53:01 UTC (rev 2176)
@@ -298,15 +298,17 @@
 
 #define VCL_RET_MAC(l,u,b,n)
 
-#define VCL_MET_MAC(func, xxx, bitmap) 					\
+#define VCL_MET_MAC(func, upper, bitmap)				\
 void									\
 VCL_##func##_method(struct sess *sp)					\
 {									\
 									\
 	sp->handling = 0;						\
+	sp->cur_method = VCL_MET_ ## upper;				\
 	WSP(sp, SLT_VCL_call, "%s", #func); 				\
 	sp->vcl->func##_func(sp);					\
 	WSP(sp, SLT_VCL_return, "%s", vcl_handlingname(sp->handling));	\
+	sp->cur_method = 0;						\
 	assert(sp->handling & bitmap);					\
 	assert(!(sp->handling & ~bitmap));				\
 }




More information about the varnish-commit mailing list