[prev in list] [next in list] [prev in thread] [next in thread] 

List:       varnish-commit
Subject:    [master] e51197f1d Output the name of duplicate filters
From:       Nils Goroll <nils.goroll () uplex ! de>
Date:       2022-09-19 13:44:05
Message-ID: 20220919134405.E37A6121E1D () lists ! varnish-cache ! org
[Download RAW message or body]


commit e51197f1df1b0c6bf4c4ab01bf647c75d94b08ab
Author: Nils Goroll <nils.goroll@uplex.de>
Date:   Tue Sep 13 18:53:30 2022 +0200

    Output the name of duplicate filters
    
    The error message for duplicate filters did not mention the filter name
    and was thus not particularly helpful. It does now, for example:
    
            rot13: VFP already registered (per-vcl)

diff --git a/bin/varnishd/cache/cache_vrt_filter.c b/bin/varnishd/cache/cache_vrt_filter.c
index 1cfedc449..bf45372d1 100644
--- a/bin/varnishd/cache/cache_vrt_filter.c
+++ b/bin/varnishd/cache/cache_vrt_filter.c
@@ -103,7 +103,7 @@ vrt_addfilter(VRT_CTX, const struct vfp *vfp, const struct vdp *vdp)
 	err = is_dup_filter(hd, vfp, vdp, name);
 	if (err != NULL) {
 		if (ctx != NULL)
-			VRT_fail(ctx, "%s (global)", err);
+			VRT_fail(ctx, "%s: %s (global)", name, err);
 		return (err);
 	}
 	if (ctx != NULL) {
@@ -112,7 +112,7 @@ vrt_addfilter(VRT_CTX, const struct vfp *vfp, const struct vdp *vdp)
 		hd = &ctx->vcl->filters;
 		err = is_dup_filter(hd, vfp, vdp, name);
 		if (err != NULL) {
-			VRT_fail(ctx, "%s (per-vcl)", err);
+			VRT_fail(ctx, "%s: %s (per-vcl)", name, err);
 			return (err);
 		}
 	}
_______________________________________________
varnish-commit mailing list
varnish-commit@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic