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
b1419a63
Commit
b1419a63
authored
Sep 09, 2016
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't insist on a particular status code from -errvcl
parent
5972f082
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
vtc_varnish.c
bin/varnishtest/vtc_varnish.c
+6
-9
No files found.
bin/varnishtest/vtc_varnish.c
View file @
b1419a63
...
...
@@ -710,8 +710,7 @@ varnish_cli(struct varnish *v, const char *cli, unsigned exp)
*/
static
void
varnish_vcl
(
struct
varnish
*
v
,
const
char
*
vcl
,
enum
VCLI_status_e
expect
,
char
**
resp
)
varnish_vcl
(
struct
varnish
*
v
,
const
char
*
vcl
,
int
fail
,
char
**
resp
)
{
struct
vsb
*
vsb
;
enum
VCLI_status_e
u
;
...
...
@@ -728,14 +727,12 @@ varnish_vcl(struct varnish *v, const char *vcl, enum VCLI_status_e expect,
AZ
(
VSB_finish
(
vsb
));
u
=
varnish_ask_cli
(
v
,
VSB_data
(
vsb
),
resp
);
if
(
u
!=
expect
)
{
if
(
u
==
CLIS_OK
&&
fail
)
{
VSB_destroy
(
&
vsb
);
vtc_log
(
v
->
vl
,
0
,
"VCL compilation got %u expected %u"
,
u
,
expect
);
"VCL compilation successed expected failure"
);
return
;
}
if
(
u
==
CLIS_OK
)
{
}
else
if
(
u
==
CLIS_OK
)
{
VSB_clear
(
vsb
);
VSB_printf
(
vsb
,
"vcl.use vcl%d"
,
v
->
vcl_nbr
);
AZ
(
VSB_finish
(
vsb
));
...
...
@@ -1075,7 +1072,7 @@ cmd_varnish(CMD_ARGS)
char
*
r
=
NULL
;
AN
(
av
[
1
]);
AN
(
av
[
2
]);
varnish_vcl
(
v
,
av
[
2
],
CLIS_PARAM
,
&
r
);
varnish_vcl
(
v
,
av
[
2
],
1
,
&
r
);
if
(
strstr
(
r
,
av
[
1
])
==
NULL
)
vtc_log
(
v
->
vl
,
0
,
"Did not find expected string: (
\"
%s
\"
)"
,
...
...
@@ -1124,7 +1121,7 @@ cmd_varnish(CMD_ARGS)
}
if
(
!
strcmp
(
*
av
,
"-vcl"
))
{
AN
(
av
[
1
]);
varnish_vcl
(
v
,
av
[
1
],
CLIS_OK
,
NULL
);
varnish_vcl
(
v
,
av
[
1
],
0
,
NULL
);
av
++
;
continue
;
}
...
...
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