Hi,

This is only called when doing return(synth(..)) so I believe it makes
sense to call it VRT_synth (before it was done on return(error(..)) thus
VRT_error).

Whether we should keep the SLT_Debug is a different story IMO but logic
above still applies.

f.-
From 870a28a7af5866b1e9a26a41c09dba9c7f9aba14 Mon Sep 17 00:00:00 2001
From: "Federico G. Schwindt" <[email protected]>
Date: Tue, 23 Jun 2015 17:36:55 +0100
Subject: [PATCH] Rename VRT_error to VCL_synth

---
 bin/varnishd/cache/cache_vrt.c | 4 ++--
 include/vrt.h                  | 2 +-
 lib/libvcc/vcc_action.c        | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/bin/varnishd/cache/cache_vrt.c b/bin/varnishd/cache/cache_vrt.c
index df6bb96..5fbf0f9 100644
--- a/bin/varnishd/cache/cache_vrt.c
+++ b/bin/varnishd/cache/cache_vrt.c
@@ -48,12 +48,12 @@ const void * const vrt_magic_string_unset = &vrt_magic_string_unset;
 /*--------------------------------------------------------------------*/
 
 void
-VRT_error(VRT_CTX, unsigned code, const char *reason)
+VRT_synth(VRT_CTX, unsigned code, const char *reason)
 {
 
 	CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
 	CHECK_OBJ_NOTNULL(ctx->req, REQ_MAGIC);
-	VSLb(ctx->vsl, SLT_Debug, "VCL_error(%u, %s)", code,
+	VSLb(ctx->vsl, SLT_Debug, "VCL_synth(%u, %s)", code,
 	    reason ?  reason : "(null)");
 	if (code < 100 || code > 999)
 		code = 503;
diff --git a/include/vrt.h b/include/vrt.h
index 63d1a85..98168a3 100644
--- a/include/vrt.h
+++ b/include/vrt.h
@@ -253,7 +253,7 @@ void VRT_purge(VRT_CTX, double ttl, double grace, double keep);
 
 void VRT_count(VRT_CTX, unsigned);
 int VRT_rewrite(const char *, const char *);
-void VRT_error(VRT_CTX, unsigned, const char *);
+void VRT_synth(VRT_CTX, unsigned, const char *);
 int VRT_switch_config(const char *);
 
 struct http *VRT_selecthttp(VRT_CTX, enum gethdr_e);
diff --git a/lib/libvcc/vcc_action.c b/lib/libvcc/vcc_action.c
index 1ec9d72..ea3e679 100644
--- a/lib/libvcc/vcc_action.c
+++ b/lib/libvcc/vcc_action.c
@@ -324,7 +324,7 @@ parse_return(struct vcc *tl)
 		}
 		ExpectErr(tl, '(');
 		vcc_NextToken(tl);
-		Fb(tl, 1, "VRT_error(ctx,\n");
+		Fb(tl, 1, "VRT_synth(ctx,\n");
 		tl->indent += INDENT;
 		vcc_Expr(tl, INT);
 		ERRCHK(tl);
-- 
2.1.4

_______________________________________________
varnish-dev mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev

Reply via email to