From: phk Date: Mon, 29 Oct 2007 07:53:01 +0000 (+0000) Subject: Give VRT code a chance to see which method we are in. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ab4b87f4bf2706350613560c794de254aaec125;p=varnish Give VRT code a chance to see which method we are in. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2176 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache.h b/varnish-cache/bin/varnishd/cache.h index f0cfa60a..6d5848b9 100644 --- a/varnish-cache/bin/varnishd/cache.h +++ b/varnish-cache/bin/varnishd/cache.h @@ -311,6 +311,7 @@ struct sess { double t_end; enum step step; + unsigned cur_method; unsigned handling; unsigned char wantbody; int err_code; diff --git a/varnish-cache/bin/varnishd/cache_vcl.c b/varnish-cache/bin/varnishd/cache_vcl.c index 3a19250f..8c141461 100644 --- a/varnish-cache/bin/varnishd/cache_vcl.c +++ b/varnish-cache/bin/varnishd/cache_vcl.c @@ -298,15 +298,17 @@ vcl_handlingname(unsigned u) #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)); \ }