Commit 6264c766 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Add back a check that was lost: You must have at least one backend.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1391 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 8b654534
......@@ -627,6 +627,14 @@ vcc_CompileSource(struct vsb *sb, struct source *sp)
if (tl->err)
return (vcc_DestroyTokenList(tl, NULL));
/* Check if we have any backends at all */
if (tl->nbackend == 0) {
vsb_printf(tl->sb,
"No backends in VCL program, at least one is necessary.\n");
tl->err = 1;
return (vcc_DestroyTokenList(tl, NULL));
}
/* Check for orphans */
if (vcc_CheckReferences(tl))
return (vcc_DestroyTokenList(tl, NULL));
......
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