[master] 4cd32f5 Only update the active_vcl on successful VCL compiles

Poul-Henning Kamp phk at FreeBSD.org
Mon Sep 12 11:13:11 CEST 2016


commit 4cd32f56edf61743d1aef144ca393d77e23fad32
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Sep 12 09:12:41 2016 +0000

    Only update the active_vcl on successful VCL compiles

diff --git a/bin/varnishd/mgt/mgt_vcl.c b/bin/varnishd/mgt/mgt_vcl.c
index ea06216..bbf590e 100644
--- a/bin/varnishd/mgt/mgt_vcl.c
+++ b/bin/varnishd/mgt/mgt_vcl.c
@@ -207,8 +207,6 @@ mgt_vcl_add(const char *name, const char *state)
 	if (vp->state != VCL_STATE_COLD)
 		vp->warm = 1;
 
-	if (active_vcl == NULL)
-		active_vcl = vp;
 	VTAILQ_INSERT_TAIL(&vclhead, vp, list);
 	return (vp);
 }
@@ -353,6 +351,9 @@ mgt_new_vcl(struct cli *cli, const char *vclname, const char *vclsrc,
 	AZ(C_flag);
 	vp->fname = lib;
 
+	if (active_vcl == NULL)
+		active_vcl = vp;
+
 	if (child_pid < 0)
 		return;
 



More information about the varnish-commit mailing list