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
dfaa9703
Commit
dfaa9703
authored
Oct 26, 2020
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move the initialization arguments from VDP_DeliverObj() to VDP_init()
parent
5b212a2c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
22 deletions
+24
-22
cache_deliver_proc.c
bin/varnishd/cache/cache_deliver_proc.c
+16
-12
cache_esi_deliver.c
bin/varnishd/cache/cache_esi_deliver.c
+1
-2
cache_filter.h
bin/varnishd/cache/cache_filter.h
+4
-3
cache_req_fsm.c
bin/varnishd/cache/cache_req_fsm.c
+1
-1
cache_http1_deliver.c
bin/varnishd/http1/cache_http1_deliver.c
+1
-2
cache_http2_deliver.c
bin/varnishd/http2/cache_http2_deliver.c
+1
-2
No files found.
bin/varnishd/cache/cache_deliver_proc.c
View file @
dfaa9703
...
@@ -35,10 +35,19 @@
...
@@ -35,10 +35,19 @@
#include "cache_filter.h"
#include "cache_filter.h"
void
void
VDP_Init
(
struct
vdp_ctx
*
vdx
)
VDP_Init
(
struct
vdp_ctx
*
vdc
,
struct
worker
*
wrk
,
struct
vsl_log
*
vsl
,
struct
req
*
req
)
{
{
INIT_OBJ
(
vdx
,
VDP_CTX_MAGIC
);
AN
(
vdc
);
VTAILQ_INIT
(
&
vdx
->
vdp
);
CHECK_OBJ_NOTNULL
(
wrk
,
WORKER_MAGIC
);
AN
(
vsl
);
CHECK_OBJ_NOTNULL
(
req
,
REQ_MAGIC
);
INIT_OBJ
(
vdc
,
VDP_CTX_MAGIC
);
VTAILQ_INIT
(
&
vdc
->
vdp
);
vdc
->
wrk
=
wrk
;
vdc
->
vsl
=
vsl
;
vdc
->
req
=
req
;
}
}
/* VDP_bytes
/* VDP_bytes
...
@@ -184,21 +193,16 @@ vdp_objiterator(void *priv, unsigned flush, const void *ptr, ssize_t len)
...
@@ -184,21 +193,16 @@ vdp_objiterator(void *priv, unsigned flush, const void *ptr, ssize_t len)
}
}
int
VDP_DeliverObj
(
struct
vdp_ctx
*
vdc
,
struct
objcore
*
oc
,
struct
worker
*
wrk
,
int
VDP_DeliverObj
(
struct
vdp_ctx
*
vdc
,
struct
objcore
*
oc
)
struct
vsl_log
*
vsl
,
struct
req
*
req
)
{
{
int
r
,
final
;
int
r
,
final
;
CHECK_OBJ_NOTNULL
(
vdc
,
VDP_CTX_MAGIC
);
CHECK_OBJ_NOTNULL
(
vdc
,
VDP_CTX_MAGIC
);
CHECK_OBJ_NOTNULL
(
oc
,
OBJCORE_MAGIC
);
CHECK_OBJ_NOTNULL
(
oc
,
OBJCORE_MAGIC
);
CHECK_OBJ_NOTNULL
(
wrk
,
WORKER_MAGIC
);
CHECK_OBJ_NOTNULL
(
vdc
->
wrk
,
WORKER_MAGIC
);
AN
(
vsl
);
AN
(
vdc
->
vsl
);
CHECK_OBJ_ORNULL
(
req
,
REQ_MAGIC
);
vdc
->
vsl
=
vsl
;
vdc
->
wrk
=
wrk
;
vdc
->
req
=
req
;
final
=
oc
->
flags
&
(
OC_F_PRIVATE
|
OC_F_HFM
|
OC_F_HFP
)
?
1
:
0
;
final
=
oc
->
flags
&
(
OC_F_PRIVATE
|
OC_F_HFM
|
OC_F_HFP
)
?
1
:
0
;
r
=
ObjIterate
(
wrk
,
oc
,
vdc
,
vdp_objiterator
,
final
);
r
=
ObjIterate
(
vdc
->
wrk
,
oc
,
vdc
,
vdp_objiterator
,
final
);
if
(
r
==
0
)
if
(
r
==
0
)
r
=
VDP_bytes
(
vdc
,
VDP_END
,
NULL
,
0
);
r
=
VDP_bytes
(
vdc
,
VDP_END
,
NULL
,
0
);
if
(
r
<
0
)
if
(
r
<
0
)
...
...
bin/varnishd/cache/cache_esi_deliver.c
View file @
dfaa9703
...
@@ -865,8 +865,7 @@ ved_deliver(struct req *req, struct boc *boc, int wantbody)
...
@@ -865,8 +865,7 @@ ved_deliver(struct req *req, struct boc *boc, int wantbody)
}
}
if
(
i
==
0
)
{
if
(
i
==
0
)
{
i
=
VDP_DeliverObj
(
i
=
VDP_DeliverObj
(
req
->
vdc
,
req
->
objcore
);
req
->
vdc
,
req
->
objcore
,
req
->
wrk
,
req
->
vsl
,
req
);
}
else
{
}
else
{
VSLb
(
req
->
vsl
,
SLT_Error
,
"Failure to push ESI processors"
);
VSLb
(
req
->
vsl
,
SLT_Error
,
"Failure to push ESI processors"
);
req
->
doclose
=
SC_OVERLOAD
;
req
->
doclose
=
SC_OVERLOAD
;
...
...
bin/varnishd/cache/cache_filter.h
View file @
dfaa9703
...
@@ -152,11 +152,12 @@ extern const struct vdp VDP_gunzip;
...
@@ -152,11 +152,12 @@ extern const struct vdp VDP_gunzip;
extern
const
struct
vdp
VDP_esi
;
extern
const
struct
vdp
VDP_esi
;
extern
const
struct
vdp
VDP_range
;
extern
const
struct
vdp
VDP_range
;
void
VDP_Init
(
struct
vdp_ctx
*
vdx
,
struct
worker
*
wrk
,
struct
vsl_log
*
vsl
,
struct
req
*
req
);
uint64_t
VDP_Close
(
struct
req
*
req
);
uint64_t
VDP_Close
(
struct
req
*
req
);
int
VDP_DeliverObj
(
struct
vdp_ctx
*
vdc
,
struct
objcore
*
oc
,
struct
worker
*
wrk
,
int
VDP_DeliverObj
(
struct
vdp_ctx
*
vdc
,
struct
objcore
*
oc
);
struct
vsl_log
*
vsl
,
struct
req
*
req
);
void
VDP_Init
(
struct
vdp_ctx
*
vdx
);
int
VDP_bytes
(
struct
vdp_ctx
*
,
enum
vdp_action
act
,
const
void
*
ptr
,
ssize_t
len
);
int
VDP_bytes
(
struct
vdp_ctx
*
,
enum
vdp_action
act
,
const
void
*
ptr
,
ssize_t
len
);
int
VDP_Push
(
struct
req
*
,
const
struct
vdp
*
,
void
*
priv
);
int
VDP_Push
(
struct
req
*
,
const
struct
vdp
*
,
void
*
priv
);
void
VRT_AddVDP
(
VRT_CTX
,
const
struct
vdp
*
);
void
VRT_AddVDP
(
VRT_CTX
,
const
struct
vdp
*
);
...
...
bin/varnishd/cache/cache_req_fsm.c
View file @
dfaa9703
...
@@ -425,7 +425,7 @@ cnt_transmit(struct worker *wrk, struct req *req)
...
@@ -425,7 +425,7 @@ cnt_transmit(struct worker *wrk, struct req *req)
sendbody
=
1
;
sendbody
=
1
;
}
}
VDP_Init
(
req
->
vdc
);
VDP_Init
(
req
->
vdc
,
req
->
wrk
,
req
->
vsl
,
req
);
if
(
req
->
filter_list
==
NULL
)
if
(
req
->
filter_list
==
NULL
)
req
->
filter_list
=
resp_Get_Filter_List
(
req
);
req
->
filter_list
=
resp_Get_Filter_List
(
req
);
if
(
req
->
filter_list
==
NULL
||
if
(
req
->
filter_list
==
NULL
||
...
...
bin/varnishd/http1/cache_http1_deliver.c
View file @
dfaa9703
...
@@ -149,8 +149,7 @@ V1D_Deliver(struct req *req, struct boc *boc, int sendbody)
...
@@ -149,8 +149,7 @@ V1D_Deliver(struct req *req, struct boc *boc, int sendbody)
(
void
)
V1L_Flush
(
req
->
wrk
);
(
void
)
V1L_Flush
(
req
->
wrk
);
if
(
chunked
)
if
(
chunked
)
V1L_Chunked
(
req
->
wrk
);
V1L_Chunked
(
req
->
wrk
);
err
=
VDP_DeliverObj
(
err
=
VDP_DeliverObj
(
req
->
vdc
,
req
->
objcore
);
req
->
vdc
,
req
->
objcore
,
req
->
wrk
,
req
->
vsl
,
req
);
if
(
!
err
&&
chunked
)
if
(
!
err
&&
chunked
)
V1L_EndChunk
(
req
->
wrk
);
V1L_EndChunk
(
req
->
wrk
);
}
}
...
...
bin/varnishd/http2/cache_http2_deliver.c
View file @
dfaa9703
...
@@ -333,8 +333,7 @@ h2_deliver(struct req *req, struct boc *boc, int sendbody)
...
@@ -333,8 +333,7 @@ h2_deliver(struct req *req, struct boc *boc, int sendbody)
/* XXX someone into H2 please add appropriate error handling */
/* XXX someone into H2 please add appropriate error handling */
if
(
sendbody
)
{
if
(
sendbody
)
{
if
(
!
VDP_Push
(
req
,
&
h2_vdp
,
NULL
))
if
(
!
VDP_Push
(
req
,
&
h2_vdp
,
NULL
))
(
void
)
VDP_DeliverObj
(
(
void
)
VDP_DeliverObj
(
req
->
vdc
,
req
->
objcore
);
req
->
vdc
,
req
->
objcore
,
req
->
wrk
,
req
->
vsl
,
req
);
}
}
AZ
(
req
->
wrk
->
v1l
);
AZ
(
req
->
wrk
->
v1l
);
...
...
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