[master] ad69f04 Rename functions to their new family

Poul-Henning Kamp phk at FreeBSD.org
Thu Apr 19 12:45:19 UTC 2018


commit ad69f04e05d77bdaa48bb05e0527eef66ffaf7a5
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Thu Apr 19 12:15:07 2018 +0000

    Rename functions to their new family

diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c
index 07259f6..4e074c7 100644
--- a/bin/varnishd/cache/cache_fetch.c
+++ b/bin/varnishd/cache/cache_fetch.c
@@ -606,7 +606,7 @@ vbf_stp_fetch(struct worker *wrk, struct busyobj *bo)
 	}
 
 	if (bo->filter_list == NULL ||
-	    VFP_FilterList(bo->vfc, bo->filter_list)) {
+	    VCL_StackVFP(bo->vfc, bo->filter_list)) {
 		(bo)->htc->doclose = SC_OVERLOAD;
 		VDI_Finish((bo)->wrk, bo);
 		return (F_STP_ERROR);
diff --git a/bin/varnishd/cache/cache_filter.h b/bin/varnishd/cache/cache_filter.h
index 65a0e65..3192238 100644
--- a/bin/varnishd/cache/cache_filter.h
+++ b/bin/varnishd/cache/cache_filter.h
@@ -88,9 +88,8 @@ struct vfp_ctx {
 enum vfp_status VFP_Suck(struct vfp_ctx *, void *p, ssize_t *lp);
 enum vfp_status VFP_Error(struct vfp_ctx *, const char *fmt, ...)
     v_printflike_(2, 3);
-int VFP_FilterList(struct vfp_ctx *, const char *);
-void VFP_AddFilter(struct vcl *, const struct vfp *);
-void VFP_RemoveFilter(struct vcl *, const struct vfp *);
+void VRT_AddVFP(VRT_CTX, const struct vfp *);
+void VRT_RemoveVFP(VRT_CTX, const struct vfp *);
 
 /* Deliver processors ------------------------------------------------*/
 
diff --git a/bin/varnishd/cache/cache_varnishd.h b/bin/varnishd/cache/cache_varnishd.h
index 072c526..c859324 100644
--- a/bin/varnishd/cache/cache_varnishd.h
+++ b/bin/varnishd/cache/cache_varnishd.h
@@ -407,6 +407,7 @@ int VCL_IterDirector(struct cli *, const char *, vcl_be_func *, void *);
 
 /* cache_vcl_vrt.c */
 void VCL_VRT_Init(void);
+int VCL_StackVFP(struct vfp_ctx *, const char *);
 
 /* cache_vrt.c */
 void VRTPRIV_init(struct vrt_privs *privs);
diff --git a/bin/varnishd/cache/cache_vcl_vrt.c b/bin/varnishd/cache/cache_vcl_vrt.c
index 9c8e823..c29e689 100644
--- a/bin/varnishd/cache/cache_vcl_vrt.c
+++ b/bin/varnishd/cache/cache_vcl_vrt.c
@@ -431,7 +431,7 @@ static struct vfp_filter_head vfp_filters =
     VTAILQ_HEAD_INITIALIZER(vfp_filters);
 
 void
-VFP_AddFilter(struct vcl *vcl, const struct vfp *filter)
+VRT_AddVFP(VRT_CTX, const struct vfp *filter)
 {
 	struct vfp_filter *vp;
 	struct vfp_filter_head *hd = &vfp_filters;
@@ -440,8 +440,8 @@ VFP_AddFilter(struct vcl *vcl, const struct vfp *filter)
 		xxxassert(vp->filter != filter);
 		xxxassert(strcasecmp(vp->filter->name, filter->name));
 	}
-	if (vcl != NULL) {
-		hd = &vcl->vfps;
+	if (ctx != NULL) {
+		hd = &ctx->vcl->vfps;
 		VTAILQ_FOREACH(vp, hd, list) {
 			xxxassert(vp->filter != filter);
 			xxxassert(strcasecmp(vp->filter->name, filter->name));
@@ -455,12 +455,11 @@ VFP_AddFilter(struct vcl *vcl, const struct vfp *filter)
 }
 
 void
-VFP_RemoveFilter(struct vcl *vcl, const struct vfp *filter)
+VRT_RemoveVFP(VRT_CTX, const struct vfp *filter)
 {
 	struct vfp_filter *vp;
-	struct vfp_filter_head *hd = &vcl->vfps;
+	struct vfp_filter_head *hd = &ctx->vcl->vfps;
 
-	AN(vcl);
 	VTAILQ_FOREACH(vp, hd, list) {
 		if (vp->filter == filter)
 			break;
@@ -471,7 +470,7 @@ VFP_RemoveFilter(struct vcl *vcl, const struct vfp *filter)
 }
 
 int
-VFP_FilterList(struct vfp_ctx *vc, const char *fl)
+VCL_StackVFP(struct vfp_ctx *vc, const char *fl)
 {
 	const char *p, *q;
 	const struct vfp_filter *vp;
@@ -504,9 +503,9 @@ VFP_FilterList(struct vfp_ctx *vc, const char *fl)
 void
 VCL_VRT_Init(void)
 {
-	VFP_AddFilter(NULL, &VFP_testgunzip);
-	VFP_AddFilter(NULL, &VFP_gunzip);
-	VFP_AddFilter(NULL, &VFP_gzip);
-	VFP_AddFilter(NULL, &VFP_esi);
-	VFP_AddFilter(NULL, &VFP_esi_gzip);
+	VRT_AddVFP(NULL, &VFP_testgunzip);
+	VRT_AddVFP(NULL, &VFP_gunzip);
+	VRT_AddVFP(NULL, &VFP_gzip);
+	VRT_AddVFP(NULL, &VFP_esi);
+	VRT_AddVFP(NULL, &VFP_esi_gzip);
 }


More information about the varnish-commit mailing list