]> err.no Git - varnish/commitdiff
Use VCC_Return_Name() instead of rolling our own.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 21 Dec 2008 10:47:09 +0000 (10:47 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 21 Dec 2008 10:47:09 +0000 (10:47 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3479 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_panic.c

index fd425af5004973da673a5f757cf325e0d2652764..d70b48cc9179c05c616df2686fd532906a31b641 100644 (file)
@@ -40,6 +40,7 @@
 #include "cache.h"
 #include "cache_backend.h"
 #include "vcl.h"
+#include "libvcl.h"
 
 /*
  * The panic string is constructed in memory, then copied to the
@@ -214,16 +215,7 @@ pan_sess(const struct sess *sp)
 /*lint -restore */
                default: stp = NULL;
        }
-       switch (sp->handling) {
-/*lint -save -e525 */
-#define VCL_RET_MAC(l, u, b, v) case VCL_RET_##u: hand = #u; break;
-#define VCL_RET_MAC_E(l, u, b, v) case VCL_RET_##u: hand = #u; break;
-#include "vcl_returns.h"
-#undef VCL_RET_MAC
-#undef VCL_RET_MAC_E
-/*lint -restore */
-               default: hand = NULL;
-       }
+       hand = VCC_Return_Name(sp->handling);
        if (stp != NULL)
                vsb_printf(vsp, "  step = %s,\n", stp);
        else