[master] 5b81596 Enforce admin health at director level
Poul-Henning Kamp
phk at FreeBSD.org
Tue Nov 14 09:31:11 UTC 2017
commit 5b81596eb498a33b6ec17caa83ca1087ecbf7afc
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Tue Nov 14 09:27:00 2017 +0000
Enforce admin health at director level
diff --git a/bin/varnishd/cache/cache_director.c b/bin/varnishd/cache/cache_director.c
index 563f46c..51d2dd3 100644
--- a/bin/varnishd/cache/cache_director.c
+++ b/bin/varnishd/cache/cache_director.c
@@ -172,16 +172,18 @@ VDI_Http1Pipe(struct req *req, struct busyobj *bo)
*/
int
-VRT_Healthy(VRT_CTX, VCL_BACKEND be)
+VRT_Healthy(VRT_CTX, VCL_BACKEND d)
{
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
- if (be == NULL)
+ if (d == NULL)
+ return (0);
+ CHECK_OBJ_NOTNULL(d, DIRECTOR_MAGIC);
+ if (!VDI_Healthy(d, NULL))
return (0);
- CHECK_OBJ_NOTNULL(be, DIRECTOR_MAGIC);
- if (be->healthy == NULL)
+ if (d->healthy == NULL)
return (1);
- return (be->healthy(be, ctx->bo, NULL));
+ return (d->healthy(d, ctx->bo, NULL));
}
/* Send Event ----------------------------------------------------------
More information about the varnish-commit
mailing list