[master] 004bfb9 The filename (twice) is not helpful if dlopen fails.

Poul-Henning Kamp phk at FreeBSD.org
Mon Aug 15 13:43:07 CEST 2016


commit 004bfb9aebc3220b2b428d813b864f10d2ddc18f
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Aug 15 09:14:12 2016 +0000

    The filename (twice) is not helpful if dlopen fails.

diff --git a/bin/varnishd/cache/cache_req_fsm.c b/bin/varnishd/cache/cache_req_fsm.c
index fa9d8f6..dba9da3 100644
--- a/bin/varnishd/cache/cache_req_fsm.c
+++ b/bin/varnishd/cache/cache_req_fsm.c
@@ -688,6 +688,9 @@ cnt_recv(struct worker *wrk, struct req *req)
 	}
 
 	VCL_recv_method(req->vcl, wrk, req, NULL, NULL);
+	if (wrk->handling == VCL_RET_VCL)
+		VCL_recv_method(req->vcl, wrk, req, NULL, NULL);
+	assert (wrk->handling != VCL_RET_VCL);
 
 	/* Attempts to cache req.body may fail */
 	if (req->req_body_status == REQ_BODY_FAIL) {
diff --git a/bin/varnishd/cache/cache_vcl.c b/bin/varnishd/cache/cache_vcl.c
index 8a31e73..d857684 100644
--- a/bin/varnishd/cache/cache_vcl.c
+++ b/bin/varnishd/cache/cache_vcl.c
@@ -310,7 +310,7 @@ VCL_Open(const char *fn, struct vsb *msg)
 	dlh = dlopen(fn, RTLD_NOW | RTLD_LOCAL);
 	if (dlh == NULL) {
 		VSB_printf(msg, "Could not load compiled VCL.\n");
-		VSB_printf(msg, "\tdlopen(%s) = %s\n", fn, dlerror());
+		VSB_printf(msg, "\tdlopen() = %s\n", dlerror());
 		return (NULL);
 	}
 	cnf = dlsym(dlh, "VCL_conf");
diff --git a/bin/varnishd/mgt/mgt_vcc.c b/bin/varnishd/mgt/mgt_vcc.c
index fdbaa00..d3096c4 100644
--- a/bin/varnishd/mgt/mgt_vcc.c
+++ b/bin/varnishd/mgt/mgt_vcc.c
@@ -105,6 +105,8 @@ run_vcc(void *priv)
 	VCC_Unsafe_Path(vcc, mgt_vcc_unsafe_path);
 	VTAILQ_FOREACH(stv, &stv_stevedores, list)
 		VCC_Stevedore(vcc, stv->ident);
+VCC_Vcl(vcc, "vclA");
+VCC_Vcl(vcc, "vclB");
 	VCC_Stevedore(vcc, stv_transient->ident);
 	csrc = VCC_Compile(vcc, &sb, vp->vclsrc, vp->vclsrcfile);
 	AZ(VSB_finish(sb));



More information about the varnish-commit mailing list