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
71f81608
Commit
71f81608
authored
Apr 22, 2013
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the busyobj workspace for random VCL work in vcl_backend_*{}
Minor polish
parent
c395b650
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
cache_req_fsm.c
bin/varnishd/cache/cache_req_fsm.c
+3
-3
cache_vcl.c
bin/varnishd/cache/cache_vcl.c
+7
-1
No files found.
bin/varnishd/cache/cache_req_fsm.c
View file @
71f81608
...
...
@@ -417,7 +417,7 @@ cnt_fetch(struct worker *wrk, struct req *req)
AZ
(
bo
->
do_pass
);
VCL_backend_response_method
(
req
->
vcl
,
wrk
,
req
,
NULL
,
req
->
htt
p
->
ws
);
bo
->
beres
p
->
ws
);
if
(
bo
->
do_pass
)
req
->
objcore
->
flags
|=
OC_F_PASS
;
...
...
@@ -924,7 +924,7 @@ cnt_miss(struct worker *wrk, struct req *req)
http_SetHeader
(
bo
->
bereq
,
"Accept-Encoding: gzip"
);
}
VCL_backend_fetch_method
(
req
->
vcl
,
wrk
,
req
,
NULL
,
req
->
http
->
ws
);
VCL_backend_fetch_method
(
req
->
vcl
,
wrk
,
req
,
NULL
,
bo
->
bereq
->
ws
);
VCL_miss_method
(
req
->
vcl
,
wrk
,
req
,
NULL
,
req
->
http
->
ws
);
if
(
wrk
->
handling
==
VCL_RET_FETCH
)
{
...
...
@@ -989,7 +989,7 @@ cnt_pass(struct worker *wrk, struct req *req)
HTTP_Setup
(
bo
->
bereq
,
bo
->
ws
,
bo
->
vsl
,
HTTP_Bereq
);
http_FilterReq
(
req
,
HTTPH_R_PASS
);
VCL_backend_fetch_method
(
req
->
vcl
,
wrk
,
req
,
NULL
,
req
->
http
->
ws
);
VCL_backend_fetch_method
(
req
->
vcl
,
wrk
,
req
,
NULL
,
bo
->
bereq
->
ws
);
VCL_pass_method
(
req
->
vcl
,
wrk
,
req
,
NULL
,
req
->
http
->
ws
);
if
(
wrk
->
handling
==
VCL_RET_ERROR
)
{
...
...
bin/varnishd/cache/cache_vcl.c
View file @
71f81608
...
...
@@ -355,7 +355,12 @@ ccf_config_use(struct cli *cli, const char * const *av, void *priv)
VBE_UseHealth
(
vcl
->
conf
->
director
[
i
]);
}
/*--------------------------------------------------------------------*/
/*--------------------------------------------------------------------
* Method functions to call into VCL programs.
*
* Either the request or busyobject must be specified, but not both.
* The workspace argument is where random VCL stuff gets space from.
*/
static
void
vcl_call_method
(
struct
worker
*
wrk
,
struct
req
*
req
,
struct
busyobj
*
bo
,
...
...
@@ -391,6 +396,7 @@ VCL_##func##_method(struct VCL_conf *vcl, struct worker *wrk, \
struct req *req, struct busyobj *bo, struct ws *ws) \
{ \
\
CHECK_OBJ_NOTNULL(vcl, VCL_CONF_MAGIC); \
CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC); \
vcl_call_method(wrk, req, bo, ws, VCL_MET_ ## upper, \
vcl->func##_func); \
...
...
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