Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
adf3f128
Commit
adf3f128
authored
Jul 15, 2013
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Report the right token in the error message.
Fixes #1322
parent
65c8593d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
6 deletions
+13
-6
v00021.vtc
bin/varnishtest/tests/v00021.vtc
+12
-2
vcc_backend.c
lib/libvcl/vcc_backend.c
+1
-3
vcc_compile.h
lib/libvcl/vcc_compile.h
+0
-1
No files found.
bin/varnishtest/tests/v00021.vtc
View file @
adf3f128
...
...
@@ -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;
}
}
lib/libvcl/vcc_backend.c
View file @
adf3f128
...
...
@@ -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
,
"
\n
directors are now in VMOD.directors
\n
"
);
vcc_ErrWhere
(
tl
,
t
l
->
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
;
}
lib/libvcl/vcc_compile.h
View file @
adf3f128
...
...
@@ -191,7 +191,6 @@ struct vcc {
int
defaultdir
;
struct
token
*
t_defaultdir
;
struct
token
*
t_dir
;
struct
token
*
t_policy
;
unsigned
unique
;
unsigned
nvmodpriv
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment