Commit 9849fd06 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Fall out of compiled VCL code if any statement sets ctx->handling non-zero.

Right now this only affects failures in vcl_init{}
parent aedc4d68
......@@ -7,19 +7,33 @@ server s1 {
varnish v1 -vcl+backend { } -start
logexpect l1 -v v1 -g raw {
expect * 0 VCL_Log "Should happen first"
expect 0 0 VCL_Log "Should happen second"
} -start
varnish v1 -errvcl "Planned failure in vcl_init" {
import debug;
import std;
backend default {
.host = "${s1_addr}";
}
sub vcl_init {
std.log("Should happen first");
debug.init_fail();
std.log("Should not happen");
}
sub vcl_fini {
std.log("Should happen second");
}
}
logexpect l1 -wait
varnish v1 -cliok "param.set nuke_limit 42"
varnish v1 -errvcl "nuke_limit is not the answer." {
......
......@@ -196,6 +196,7 @@ vcc_Compound(struct vcc *tl)
vcc_ErrWhere(tl, tl->t);
return;
}
Fb(tl, 1, "if (*ctx->handling) return(1);\n");
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment