r1391 - trunk/varnish-cache/lib/libvcl
phk at projects.linpro.no
phk at projects.linpro.no
Wed May 9 10:44:28 CEST 2007
Author: phk
Date: 2007-05-09 10:44:28 +0200 (Wed, 09 May 2007)
New Revision: 1391
Modified:
trunk/varnish-cache/lib/libvcl/vcc_compile.c
Log:
Add back a check that was lost: You must have at least one backend.
Modified: trunk/varnish-cache/lib/libvcl/vcc_compile.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_compile.c 2007-05-09 08:39:50 UTC (rev 1390)
+++ trunk/varnish-cache/lib/libvcl/vcc_compile.c 2007-05-09 08:44:28 UTC (rev 1391)
@@ -627,6 +627,14 @@
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));
More information about the varnish-commit
mailing list