[master] 4a7033a Make sure we don't get spurious VCL events

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Tue Sep 19 20:37:07 UTC 2017


commit 4a7033a69759f300d9f9112c45db8f3c8f147684
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Tue Sep 19 18:13:23 2017 +0200

    Make sure we don't get spurious VCL events
    
    Refs #2432

diff --git a/bin/varnishd/mgt/mgt_vcl.c b/bin/varnishd/mgt/mgt_vcl.c
index e43967f..24fe078 100644
--- a/bin/varnishd/mgt/mgt_vcl.c
+++ b/bin/varnishd/mgt/mgt_vcl.c
@@ -380,8 +380,10 @@ mgt_vcl_setstate(struct cli *cli, struct vclprog *vp, const char *vs)
 
 	if (vp == active_vcl || mcf_is_label(vp)) {
 		AN(vp->warm);
+		assert(vs != VCL_STATE_COLD);
 		return (0);
 	}
+
 	if (vs == VCL_STATE_AUTO) {
 		now = VTIM_mono();
 		vs = (vp->warm ? VCL_STATE_WARM : VCL_STATE_COLD);


More information about the varnish-commit mailing list