]> err.no Git - varnish/commitdiff
Make VCC_Return_Name() return lower case, and use it also for the SMH
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 21 Dec 2008 10:55:53 +0000 (10:55 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 21 Dec 2008 10:55:53 +0000 (10:55 +0000)
logging.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3480 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_vcl.c
varnish-cache/lib/libvcl/vcc_compile.c

index 249a4f810eb05ee30c35ef7e71a786be314b7ee2..fed75a20de783464ec4a99a43913657869abc14c 100644 (file)
@@ -46,6 +46,7 @@
 #include "shmlog.h"
 #include "vcl.h"
 #include "cache.h"
+#include "libvcl.h"
 
 struct vcls {
        unsigned                magic;
@@ -299,21 +300,6 @@ ccf_config_use(struct cli *cli, const char * const *av, void *priv)
 
 /*--------------------------------------------------------------------*/
 
-static const char *
-vcl_handlingname(unsigned u)
-{
-
-       switch (u) {
-#define VCL_RET_MAC(a, b, c,d) case VCL_RET_##b: return(#a);
-#define VCL_RET_MAC_E(a, b, c,d)       case VCL_RET_##b: return(#a);
-#include "vcl_returns.h"
-#undef VCL_RET_MAC
-#undef VCL_RET_MAC_E
-       default:
-               return (NULL);
-       }
-}
-
 #define VCL_RET_MAC(l,u,b,n)
 
 #define VCL_MET_MAC(func, upper, bitmap)                               \
@@ -325,7 +311,7 @@ VCL_##func##_method(struct sess *sp)                                        \
        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));  \
+       WSP(sp, SLT_VCL_return, "%s", VCC_Return_Name(sp->handling));   \
        sp->cur_method = 0;                                             \
        assert(sp->handling & bitmap);                                  \
        assert(!(sp->handling & ~bitmap));                              \
index 5a8aceba95e463de5b21494471b0d97d3bb754ba..7ffa6b77ad45d3c6340be82211a5f54ddb8d0493 100644 (file)
@@ -670,8 +670,8 @@ VCC_Return_Name(unsigned method)
 
        switch (method) {
        case 0: return ("<none>");
-#define VCL_RET_MAC(l, u, b, i) case b: return(#u);
-#define VCL_RET_MAC_E(l, u, b, i) case b: return(#u);
+#define VCL_RET_MAC(l, u, b, i) case b: return(#l);
+#define VCL_RET_MAC_E(l, u, b, i) case b: return(#l);
 #include "vcl_returns.h"
 #undef VCL_RET_MAC_E
 #undef VCL_RET_MAC