[master] c857656 Tell which director the NULL backend was attempted on

Poul-Henning Kamp phk at FreeBSD.org
Thu Apr 26 21:18:12 UTC 2018


commit c8576564c1e8287f899b5b7874fd88b4e1928cc3
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 94bb195..ffecf08 100644
--- a/lib/libvmod_directors/vdir.c
+++ b/lib/libvmod_directors/vdir.c
@@ -121,7 +121,8 @@ vdir_add_backend(VRT_CTX, struct vdir *vd, VCL_BACKEND be, double weight)
 	CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
 	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(ctx, VRT_CTX_MAGIC);
 	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