Commit adf3f128 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Report the right token in the error message.

Fixes #1322
parent 65c8593d
......@@ -54,8 +54,6 @@ varnish v1 -errvcl {Unused sub foo, defined:} {
sub foo {
}
}
varnish v1 -errvcl {Invalid return "deliver"} {
backend b { .host = "127.0.0.1"; }
......@@ -67,3 +65,15 @@ varnish v1 -errvcl {Invalid return "deliver"} {
return (deliver);
}
}
varnish v1 -errvcl {directors are now in VMOD.directors} {
backend b { .host = "127.0.0.1"; }
director d1 random {
.backend b;
}
sub vcl_recv {
set req.backend = d1;
}
}
......@@ -658,12 +658,11 @@ vcc_ParseDirector(struct vcc *tl)
isfirst = tl->ndirector;
if (vcc_IdIs(t_first, "backend")) {
tl->t_policy = t_first;
vcc_ParseSimpleDirector(tl);
} else {
VSB_printf(tl->sb,
"\ndirectors are now in VMOD.directors\n");
vcc_ErrWhere(tl, tl->t_policy);
vcc_ErrWhere(tl, t_first);
return;
}
if (tl->err) {
......@@ -678,6 +677,5 @@ vcc_ParseDirector(struct vcc *tl)
tl->t_defaultdir = tl->t_dir;
}
tl->t_policy = NULL;
tl->t_dir = NULL;
}
......@@ -191,7 +191,6 @@ struct vcc {
int defaultdir;
struct token *t_defaultdir;
struct token *t_dir;
struct token *t_policy;
unsigned unique;
unsigned nvmodpriv;
......
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