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
a239c03c
Commit
a239c03c
authored
Sep 25, 2014
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow vcl_init{} to return(fail) in which case vcl.load or vcl.inline
fails too.
parent
c7611af5
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
5 deletions
+11
-5
cache_vcl.c
bin/varnishd/cache/cache_vcl.c
+9
-3
mgt_vcc.c
bin/varnishd/mgt/mgt_vcc.c
+1
-1
generate.py
lib/libvcc/generate.py
+1
-1
No files found.
bin/varnishd/cache/cache_vcl.c
View file @
a239c03c
...
...
@@ -220,13 +220,19 @@ VCL_Load(const char *fn, const char *name, struct cli *cli)
FREE_OBJ
(
vcl
);
return
(
1
);
}
REPLACE
(
vcl
->
name
,
name
);
VCLI_Out
(
cli
,
"Loaded
\"
%s
\"
as
\"
%s
\"
"
,
fn
,
name
);
VTAILQ_INSERT_TAIL
(
&
vcl_head
,
vcl
,
list
);
ctx
.
method
=
VCL_MET_INIT
;
ctx
.
handling
=
&
hand
;
(
void
)
vcl
->
conf
->
init_func
(
&
ctx
);
if
(
hand
==
VCL_RET_FAIL
)
{
VCLI_Out
(
cli
,
"VCL
\"
%s
\"
vcl_init{} failed"
,
name
);
(
void
)
dlclose
(
vcl
->
dlh
);
FREE_OBJ
(
vcl
);
return
(
1
);
}
assert
(
hand
==
VCL_RET_OK
);
REPLACE
(
vcl
->
name
,
name
);
VCLI_Out
(
cli
,
"Loaded
\"
%s
\"
as
\"
%s
\"
"
,
fn
,
name
);
VTAILQ_INSERT_TAIL
(
&
vcl_head
,
vcl
,
list
);
Lck_Lock
(
&
vcl_mtx
);
if
(
vcl_active
==
NULL
)
vcl_active
=
vcl
;
...
...
bin/varnishd/mgt/mgt_vcc.c
View file @
a239c03c
...
...
@@ -538,7 +538,7 @@ mcf_config_inline(struct cli *cli, const char * const *av, void *priv)
VCLI_SetResult
(
cli
,
CLIS_PARAM
);
return
;
}
VCLI_Out
(
cli
,
"VCL compiled."
);
VCLI_Out
(
cli
,
"VCL compiled.
\n
"
);
if
(
child_pid
>=
0
&&
mgt_cli_askchild
(
&
status
,
&
p
,
"vcl.load %s %s
\n
"
,
av
[
2
],
vf
))
{
VCLI_SetResult
(
cli
,
status
);
...
...
lib/libvcc/generate.py
View file @
a239c03c
...
...
@@ -140,7 +140,7 @@ returns =(
(
'init'
,
""
,
(
'ok'
,)
(
'ok'
,
'fail'
)
),
(
'fini'
,
""
,
...
...
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