]> err.no Git - varnish/commitdiff
Give VRT code a chance to see which method we are in.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 29 Oct 2007 07:53:01 +0000 (07:53 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 29 Oct 2007 07:53:01 +0000 (07:53 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2176 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache.h
varnish-cache/bin/varnishd/cache_vcl.c

index f0cfa60a75695718d9755594aff31f1c3780bec2..6d5848b95229fe5f043f63607bf5b1d91d7ee756 100644 (file)
@@ -311,6 +311,7 @@ struct sess {
        double                  t_end;
 
        enum step               step;
+       unsigned                cur_method;
        unsigned                handling;
        unsigned char           wantbody;
        int                     err_code;
index 3a19250f856510880193547dfa404d35ad19109e..8c141461866a1effa399411a7f1bbf2807bfa08a 100644 (file)
@@ -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));                              \
 }