From 7eacdc674ef08f66fbb03ccb712d6ccfe4e0b059 Mon Sep 17 00:00:00 2001 From: phk Date: Sun, 21 Dec 2008 10:55:53 +0000 Subject: [PATCH] Make VCC_Return_Name() return lower case, and use it also for the SMH 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 | 18 ++---------------- varnish-cache/lib/libvcl/vcc_compile.c | 4 ++-- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/varnish-cache/bin/varnishd/cache_vcl.c b/varnish-cache/bin/varnishd/cache_vcl.c index 249a4f81..fed75a20 100644 --- a/varnish-cache/bin/varnishd/cache_vcl.c +++ b/varnish-cache/bin/varnishd/cache_vcl.c @@ -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)); \ diff --git a/varnish-cache/lib/libvcl/vcc_compile.c b/varnish-cache/lib/libvcl/vcc_compile.c index 5a8aceba..7ffa6b77 100644 --- a/varnish-cache/lib/libvcl/vcc_compile.c +++ b/varnish-cache/lib/libvcl/vcc_compile.c @@ -670,8 +670,8 @@ VCC_Return_Name(unsigned method) switch (method) { case 0: return (""); -#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 -- 2.39.5