[6.0] 6b27d7aa1 Tell which director the NULL backend was attempted on

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Thu Aug 16 08:52:50 UTC 2018


commit 6b27d7aa146d7137eda70206d8de89d2b1a84a5c
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Thu Apr 26 21:15:30 2018 +0000

    Tell which director the NULL backend was attempted on

diff --git a/lib/libvmod_directors/vdir.c b/lib/libvmod_directors/vdir.c
index 95cc9dfa4..84895c365 100644
--- a/lib/libvmod_directors/vdir.c
+++ b/lib/libvmod_directors/vdir.c
@@ -122,7 +122,8 @@ vdir_add_backend(VRT_CTX, struct vdir *vd, VCL_BACKEND be, double weight)
 
 	CHECK_OBJ_NOTNULL(vd, VDIR_MAGIC);
 	if (be == NULL) {
-		VRT_fail(ctx, "NULL backend cannot be added");
+		VRT_fail(ctx, "%s: NULL backend cannot be added",
+		    vd->dir->vcl_name);
 		return;
 	}
 	AN(be);
@@ -144,7 +145,8 @@ vdir_remove_backend(VRT_CTX, struct vdir *vd, VCL_BACKEND be, unsigned *cur)
 
 	CHECK_OBJ_NOTNULL(vd, VDIR_MAGIC);
 	if (be == NULL) {
-		VRT_fail(ctx, "NULL backend cannot be removed");
+		VRT_fail(ctx, "%s: NULL backend cannot be removed",
+		    vd->dir->vcl_name);
 		return;
 	}
 	CHECK_OBJ(be, DIRECTOR_MAGIC);


More information about the varnish-commit mailing list