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
c3adc837
Commit
c3adc837
authored
Mar 07, 2015
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename VCL_EVENT_* to match the CLI commands
parent
017278ba
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
11 deletions
+11
-11
cache_vcl.c
bin/varnishd/cache/cache_vcl.c
+5
-5
generate.py
lib/libvcc/generate.py
+3
-3
vcc_backend.c
lib/libvcc/vcc_backend.c
+1
-1
vcc_compile.c
lib/libvcc/vcc_compile.c
+2
-2
No files found.
bin/varnishd/cache/cache_vcl.c
View file @
c3adc837
...
@@ -217,9 +217,9 @@ VCL_Load(const char *fn, const char *name, struct cli *cli)
...
@@ -217,9 +217,9 @@ VCL_Load(const char *fn, const char *name, struct cli *cli)
ctx
.
cli
=
cli
;
ctx
.
cli
=
cli
;
ctx
.
vcl
=
vcl
->
conf
;
ctx
.
vcl
=
vcl
->
conf
;
if
(
vcl
->
conf
->
event_vcl
(
&
ctx
,
VCL_EVENT_
INIT
))
{
if
(
vcl
->
conf
->
event_vcl
(
&
ctx
,
VCL_EVENT_
LOAD
))
{
VCLI_Out
(
cli
,
"VCL
\"
%s
\"
Failed to initialize"
,
name
);
VCLI_Out
(
cli
,
"VCL
\"
%s
\"
Failed to initialize"
,
name
);
AZ
(
vcl
->
conf
->
event_vcl
(
&
ctx
,
VCL_EVENT_
FINI
));
AZ
(
vcl
->
conf
->
event_vcl
(
&
ctx
,
VCL_EVENT_
DISCARD
));
(
void
)
dlclose
(
vcl
->
dlh
);
(
void
)
dlclose
(
vcl
->
dlh
);
FREE_OBJ
(
vcl
);
FREE_OBJ
(
vcl
);
return
(
1
);
return
(
1
);
...
@@ -229,7 +229,7 @@ VCL_Load(const char *fn, const char *name, struct cli *cli)
...
@@ -229,7 +229,7 @@ VCL_Load(const char *fn, const char *name, struct cli *cli)
VCLI_Out
(
cli
,
"VCL
\"
%s
\"
vcl_init{} failed"
,
name
);
VCLI_Out
(
cli
,
"VCL
\"
%s
\"
vcl_init{} failed"
,
name
);
ctx
.
method
=
VCL_MET_FINI
;
ctx
.
method
=
VCL_MET_FINI
;
(
void
)
vcl
->
conf
->
fini_func
(
&
ctx
);
(
void
)
vcl
->
conf
->
fini_func
(
&
ctx
);
AZ
(
vcl
->
conf
->
event_vcl
(
&
ctx
,
VCL_EVENT_
FINI
));
AZ
(
vcl
->
conf
->
event_vcl
(
&
ctx
,
VCL_EVENT_
DISCARD
));
(
void
)
dlclose
(
vcl
->
dlh
);
(
void
)
dlclose
(
vcl
->
dlh
);
FREE_OBJ
(
vcl
);
FREE_OBJ
(
vcl
);
return
(
1
);
return
(
1
);
...
@@ -268,7 +268,7 @@ VCL_Nuke(struct vcls *vcl)
...
@@ -268,7 +268,7 @@ VCL_Nuke(struct vcls *vcl)
ctx
.
vcl
=
vcl
->
conf
;
ctx
.
vcl
=
vcl
->
conf
;
(
void
)
vcl
->
conf
->
fini_func
(
&
ctx
);
(
void
)
vcl
->
conf
->
fini_func
(
&
ctx
);
assert
(
hand
==
VCL_RET_OK
);
assert
(
hand
==
VCL_RET_OK
);
AZ
(
vcl
->
conf
->
event_vcl
(
&
ctx
,
VCL_EVENT_
FINI
));
AZ
(
vcl
->
conf
->
event_vcl
(
&
ctx
,
VCL_EVENT_
DISCARD
));
free
(
vcl
->
conf
->
loaded_name
);
free
(
vcl
->
conf
->
loaded_name
);
(
void
)
dlclose
(
vcl
->
dlh
);
(
void
)
dlclose
(
vcl
->
dlh
);
FREE_OBJ
(
vcl
);
FREE_OBJ
(
vcl
);
...
@@ -360,7 +360,7 @@ ccf_config_use(struct cli *cli, const char * const *av, void *priv)
...
@@ -360,7 +360,7 @@ ccf_config_use(struct cli *cli, const char * const *av, void *priv)
INIT_OBJ
(
&
ctx
,
VRT_CTX_MAGIC
);
INIT_OBJ
(
&
ctx
,
VRT_CTX_MAGIC
);
ctx
.
handling
=
&
hand
;
ctx
.
handling
=
&
hand
;
ctx
.
cli
=
cli
;
ctx
.
cli
=
cli
;
if
(
vcl
->
conf
->
event_vcl
(
&
ctx
,
VCL_EVENT_
ACTIVAT
E
))
{
if
(
vcl
->
conf
->
event_vcl
(
&
ctx
,
VCL_EVENT_
US
E
))
{
VCLI_Out
(
cli
,
"VCL
\"
%s
\"
Failed to activate"
,
av
[
2
]);
VCLI_Out
(
cli
,
"VCL
\"
%s
\"
Failed to activate"
,
av
[
2
]);
VCLI_SetResult
(
cli
,
CLIS_CANT
);
VCLI_SetResult
(
cli
,
CLIS_CANT
);
return
;
return
;
...
...
lib/libvcc/generate.py
View file @
c3adc837
...
@@ -946,9 +946,9 @@ struct cli;
...
@@ -946,9 +946,9 @@ struct cli;
struct worker;
struct worker;
enum vcl_event_e {
enum vcl_event_e {
VCL_EVENT_
INIT
,
VCL_EVENT_
LOAD
,
VCL_EVENT_
ACTIVAT
E,
VCL_EVENT_
US
E,
VCL_EVENT_
FINI
,
VCL_EVENT_
DISCARD
,
};
};
typedef int vcl_event_f(VRT_CTX, enum vcl_event_e);
typedef int vcl_event_f(VRT_CTX, enum vcl_event_e);
...
...
lib/libvcc/vcc_backend.c
View file @
c3adc837
...
@@ -434,7 +434,7 @@ vcc_ParseHostDef(struct vcc *tl, const struct token *t_be)
...
@@ -434,7 +434,7 @@ vcc_ParseHostDef(struct vcc *tl, const struct token *t_be)
"
\t
VRT_fini_vbe(ctx, &VGCDIR(%s), &vgc_dir_priv_%s);"
,
"
\t
VRT_fini_vbe(ctx, &VGCDIR(%s), &vgc_dir_priv_%s);"
,
vgcname
,
vgcname
);
vgcname
,
vgcname
);
VSB_printf
(
ifp
->
event
,
VSB_printf
(
ifp
->
event
,
"
\t
if (ev == VCL_EVENT_
ACTIVAT
E)
\n
"
"
\t
if (ev == VCL_EVENT_
US
E)
\n
"
"
\t\t
VRT_use_vbe(ctx, VGCDIR(%s), &vgc_dir_priv_%s);"
,
"
\t\t
VRT_use_vbe(ctx, VGCDIR(%s), &vgc_dir_priv_%s);"
,
vgcname
,
vgcname
);
vgcname
,
vgcname
);
tl
->
ndirector
++
;
tl
->
ndirector
++
;
...
...
lib/libvcc/vcc_compile.c
View file @
c3adc837
...
@@ -344,9 +344,9 @@ EmitInitFini(const struct vcc *tl)
...
@@ -344,9 +344,9 @@ EmitInitFini(const struct vcc *tl)
Fc
(
tl
,
0
,
"
\n
static int
\n
"
);
Fc
(
tl
,
0
,
"
\n
static int
\n
"
);
Fc
(
tl
,
0
,
"VGC_Event(VRT_CTX, enum vcl_event_e ev)
\n
"
);
Fc
(
tl
,
0
,
"VGC_Event(VRT_CTX, enum vcl_event_e ev)
\n
"
);
Fc
(
tl
,
0
,
"{
\n
"
);
Fc
(
tl
,
0
,
"{
\n
"
);
Fc
(
tl
,
0
,
"
\t
if (ev == VCL_EVENT_
INIT
)
\n
"
);
Fc
(
tl
,
0
,
"
\t
if (ev == VCL_EVENT_
LOAD
)
\n
"
);
Fc
(
tl
,
0
,
"
\t\t
return(VGC_Init(ctx));
\n
"
);
Fc
(
tl
,
0
,
"
\t\t
return(VGC_Init(ctx));
\n
"
);
Fc
(
tl
,
0
,
"
\t
if (ev == VCL_EVENT_
FINI
)
\n
"
);
Fc
(
tl
,
0
,
"
\t
if (ev == VCL_EVENT_
DISCARD
)
\n
"
);
Fc
(
tl
,
0
,
"
\t\t
return(VGC_Fini(ctx));
\n
"
);
Fc
(
tl
,
0
,
"
\t\t
return(VGC_Fini(ctx));
\n
"
);
Fc
(
tl
,
0
,
"
\t\n
"
);
Fc
(
tl
,
0
,
"
\t\n
"
);
VTAILQ_FOREACH
(
p
,
&
tl
->
inifin
,
list
)
{
VTAILQ_FOREACH
(
p
,
&
tl
->
inifin
,
list
)
{
...
...
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