[master] 919151c Make VCL_conf available during VCL events.

Poul-Henning Kamp phk at FreeBSD.org
Mon Mar 2 11:51:59 CET 2015


commit 919151ca37a2050c6b7e016017201087404bde55
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Mar 2 10:13:45 2015 +0000

    Make VCL_conf available during VCL events.

diff --git a/bin/varnishd/cache/cache_vcl.c b/bin/varnishd/cache/cache_vcl.c
index cee97e8..9606361 100644
--- a/bin/varnishd/cache/cache_vcl.c
+++ b/bin/varnishd/cache/cache_vcl.c
@@ -215,6 +215,7 @@ VCL_Load(const char *fn, const char *name, struct cli *cli)
 	ctx.method = VCL_MET_INIT;
 	ctx.handling = &hand;
 	ctx.cli = cli;
+	ctx.vcl = vcl->conf;
 
 	if (vcl->conf->event_vcl(&ctx, VCL_EVENT_INIT)) {
 		VCLI_Out(cli, "VCL \"%s\" Failed to initialize", name);
@@ -264,6 +265,7 @@ VCL_Nuke(struct vcls *vcl)
 	VTAILQ_REMOVE(&vcl_head, vcl, list);
 	ctx.method = VCL_MET_FINI;
 	ctx.handling = &hand;
+	ctx.vcl = vcl->conf;
 	(void)vcl->conf->fini_func(&ctx);
 	assert(hand == VCL_RET_OK);
 	AZ(vcl->conf->event_vcl(&ctx, VCL_EVENT_FINI));



More information about the varnish-commit mailing list