[master] dfe6df9a6 Rename bo->filter_list -> bo->vfp_filter_list

Poul-Henning Kamp phk at FreeBSD.org
Mon Oct 26 20:07:09 UTC 2020


commit dfe6df9a6c4b693a3e18d7350734667ef624df0e
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Oct 26 18:21:36 2020 +0000

    Rename bo->filter_list -> bo->vfp_filter_list

diff --git a/bin/varnishd/cache/cache.h b/bin/varnishd/cache/cache.h
index dbeabe7b1..b8dbd1303 100644
--- a/bin/varnishd/cache/cache.h
+++ b/bin/varnishd/cache/cache.h
@@ -382,7 +382,7 @@ struct busyobj {
 	struct worker		*wrk;
 
 	struct vfp_ctx		*vfc;
-	const char		*filter_list;
+	const char		*vfp_filter_list;
 
 	struct ws		ws[1];
 	uintptr_t		ws_bo;
diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c
index 218df239a..13d240a83 100644
--- a/bin/varnishd/cache/cache_fetch.c
+++ b/bin/varnishd/cache/cache_fetch.c
@@ -127,7 +127,7 @@ vbf_cleanup(struct busyobj *bo)
 	CHECK_OBJ_NOTNULL(vfc, VFP_CTX_MAGIC);
 
 	bo->acct.beresp_bodybytes += VFP_Close(vfc);
-	bo->filter_list = NULL;
+	bo->vfp_filter_list = NULL;
 
 	if (bo->director_state != DIR_S_NULL)
 		VDI_Finish(bo);
@@ -147,7 +147,7 @@ Bereq_Rollback(struct busyobj *bo)
 	VCL_TaskLeave(bo->privs);
 	VCL_TaskEnter(bo->privs);
 	HTTP_Clone(bo->bereq, bo->bereq0);
-	bo->filter_list = NULL;
+	bo->vfp_filter_list = NULL;
 	bo->err_reason = NULL;
 	WS_Rollback(bo->bereq->ws, bo->ws_bo);
 	WS_Rollback(bo->ws, bo->ws_bo);
@@ -635,13 +635,13 @@ vbf_stp_fetch(struct worker *wrk, struct busyobj *bo)
 		http_Unset(bo->beresp, H_Content_Encoding);
 		bo->do_gzip = bo->do_gunzip = 0;
 		bo->do_stream = 0;
-		bo->filter_list = "";
-	} else if (bo->filter_list == NULL) {
-		bo->filter_list = VBF_Get_Filter_List(bo);
+		bo->vfp_filter_list = "";
+	} else if (bo->vfp_filter_list == NULL) {
+		bo->vfp_filter_list = VBF_Get_Filter_List(bo);
 	}
 
-	if (bo->filter_list == NULL ||
-	    VCL_StackVFP(bo->vfc, bo->vcl, bo->filter_list)) {
+	if (bo->vfp_filter_list == NULL ||
+	    VCL_StackVFP(bo->vfc, bo->vcl, bo->vfp_filter_list)) {
 		(bo)->htc->doclose = SC_OVERLOAD;
 		vbf_cleanup(bo);
 		return (F_STP_ERROR);
diff --git a/bin/varnishd/cache/cache_panic.c b/bin/varnishd/cache/cache_panic.c
index a0292e023..abd637e2f 100644
--- a/bin/varnishd/cache/cache_panic.c
+++ b/bin/varnishd/cache/cache_panic.c
@@ -391,8 +391,8 @@ pan_busyobj(struct vsb *vsb, const struct busyobj *bo)
 
 	if (bo->vfc != NULL)
 		pan_vfp(vsb, bo->vfc);
-	if (bo->filter_list != NULL)
-		VSB_printf(vsb, "filter_list = \"%s\",\n", bo->filter_list);
+	if (bo->vfp_filter_list != NULL)
+		VSB_printf(vsb, "filter_list = \"%s\",\n", bo->vfp_filter_list);
 
 	WS_Panic(bo->ws, vsb);
 	VSB_printf(vsb, "ws_bo = %p,\n", (void *)bo->ws_bo);
diff --git a/bin/varnishd/cache/cache_vrt_filter.c b/bin/varnishd/cache/cache_vrt_filter.c
index 5f972520e..54002bec4 100644
--- a/bin/varnishd/cache/cache_vrt_filter.c
+++ b/bin/varnishd/cache/cache_vrt_filter.c
@@ -386,14 +386,14 @@ resp_Get_Filter_List(struct req *req)
 
 /*--------------------------------------------------------------------*/
 
-#define FILTER_VAR(vcl, in, func)					\
+#define FILTER_VAR(vcl, in, func, fld)					\
 	VCL_STRING							\
 	VRT_r_##vcl##_filters(VRT_CTX)					\
 	{								\
 									\
 		CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);			\
-		if (ctx->in->filter_list != NULL)			\
-			return(ctx->in->filter_list);			\
+		if (ctx->in->fld != NULL)				\
+			return(ctx->in->fld);				\
 		return (func(ctx->in));					\
 	}								\
 									\
@@ -410,8 +410,8 @@ resp_Get_Filter_List(struct req *req)
 		if (b == NULL)						\
 			WS_MarkOverflow(ctx->in->ws);			\
 		else							\
-			ctx->in->filter_list = b;			\
+			ctx->in->fld = b;				\
 	}
 
-FILTER_VAR(beresp, bo, VBF_Get_Filter_List)
-FILTER_VAR(resp, req, resp_Get_Filter_List)
+FILTER_VAR(beresp, bo, VBF_Get_Filter_List, vfp_filter_list)
+FILTER_VAR(resp, req, resp_Get_Filter_List, filter_list)
diff --git a/bin/varnishd/cache/cache_vrt_var.c b/bin/varnishd/cache/cache_vrt_var.c
index 957d49cdb..b9165d96b 100644
--- a/bin/varnishd/cache/cache_vrt_var.c
+++ b/bin/varnishd/cache/cache_vrt_var.c
@@ -189,9 +189,10 @@ VRT_r_obj_reason(VRT_CTX)
 static inline int
 beresp_filter_fixed(VRT_CTX, const char *s)
 {
-	if (ctx->bo->filter_list == NULL)
+	if (ctx->bo->vfp_filter_list == NULL)
 		return (0);
-	VRT_fail(ctx, "beresp.filters are already fixed, beresp.%s is undefined", s);
+	VRT_fail(ctx,
+	    "beresp.filters are already fixed, beresp.%s is undefined", s);
 	return (1);
 }
 


More information about the varnish-commit mailing list