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
d717b1bc
Commit
d717b1bc
authored
Aug 05, 2014
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More trivial changes to use req->objcore instead of req->obj
parent
01ccb320
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
21 deletions
+21
-21
cache_http1_deliver.c
bin/varnishd/cache/cache_http1_deliver.c
+3
-3
cache_panic.c
bin/varnishd/cache/cache_panic.c
+2
-2
cache_req_fsm.c
bin/varnishd/cache/cache_req_fsm.c
+14
-14
cache_rfc2616.c
bin/varnishd/cache/cache_rfc2616.c
+1
-1
cache_vrt.c
bin/varnishd/cache/cache_vrt.c
+1
-1
No files found.
bin/varnishd/cache/cache_http1_deliver.c
View file @
d717b1bc
...
...
@@ -235,7 +235,7 @@ V1D_Deliver(struct req *req, struct busyobj *bo)
ssize_t
l
;
CHECK_OBJ_NOTNULL
(
req
,
REQ_MAGIC
);
CHECK_OBJ_NOTNULL
(
req
->
obj
->
obj
core
,
OBJCORE_MAGIC
);
CHECK_OBJ_NOTNULL
(
req
->
objcore
,
OBJCORE_MAGIC
);
req
->
res_mode
=
0
;
...
...
@@ -251,7 +251,7 @@ V1D_Deliver(struct req *req, struct busyobj *bo)
}
else
if
(
bo
==
NULL
)
{
/* XXX: Not happy with this convoluted test */
req
->
res_mode
|=
RES_LEN
;
if
(
!
(
req
->
obj
->
obj
core
->
flags
&
OC_F_PASS
)
||
if
(
!
(
req
->
objcore
->
flags
&
OC_F_PASS
)
||
req
->
obj
->
len
!=
0
)
{
http_Unset
(
req
->
resp
,
H_Content_Length
);
http_PrintfHeader
(
req
->
resp
,
...
...
@@ -336,7 +336,7 @@ V1D_Deliver(struct req *req, struct busyobj *bo)
ESI_Deliver
(
req
);
}
else
if
(
req
->
res_mode
&
RES_ESI_CHILD
&&
req
->
gzip_resp
)
{
l
=
-
1
;
while
(
req
->
obj
->
obj
core
->
busyobj
)
{
while
(
req
->
objcore
->
busyobj
)
{
assert
(
bo
!=
NULL
);
l
=
VBO_waitlen
(
bo
,
l
);
}
...
...
bin/varnishd/cache/cache_panic.c
View file @
d717b1bc
...
...
@@ -397,8 +397,8 @@ pan_req(const struct req *req)
pan_vcl
(
req
->
vcl
);
if
(
VALID_OBJ
(
req
->
obj
,
OBJECT_MAGIC
))
{
if
(
req
->
obj
->
obj
core
->
busyobj
!=
NULL
)
pan_busyobj
(
req
->
obj
->
obj
core
->
busyobj
);
if
(
req
->
objcore
->
busyobj
!=
NULL
)
pan_busyobj
(
req
->
objcore
->
busyobj
);
pan_object
(
"REQ"
,
req
->
obj
);
}
...
...
bin/varnishd/cache/cache_req_fsm.c
View file @
d717b1bc
...
...
@@ -95,14 +95,14 @@ cnt_deliver(struct worker *wrk, struct req *req)
CHECK_OBJ_NOTNULL
(
req
->
objcore
,
OBJCORE_MAGIC
);
CHECK_OBJ_NOTNULL
(
req
->
obj
->
objcore
,
OBJCORE_MAGIC
);
assert
(
req
->
obj
->
objcore
==
req
->
objcore
);
CHECK_OBJ_NOTNULL
(
req
->
obj
->
obj
core
->
objhead
,
OBJHEAD_MAGIC
);
CHECK_OBJ_NOTNULL
(
req
->
objcore
->
objhead
,
OBJHEAD_MAGIC
);
CHECK_OBJ_NOTNULL
(
req
->
vcl
,
VCL_CONF_MAGIC
);
assert
(
WRW_IsReleased
(
wrk
));
assert
(
req
->
obj
->
obj
core
->
refcnt
>
0
);
assert
(
req
->
objcore
->
refcnt
>
0
);
if
(
req
->
obj
->
obj
core
->
exp_flags
&
OC_EF_EXP
)
EXP_Touch
(
req
->
obj
->
obj
core
,
req
->
t_prev
);
if
(
req
->
objcore
->
exp_flags
&
OC_EF_EXP
)
EXP_Touch
(
req
->
objcore
,
req
->
t_prev
);
HTTP_Setup
(
req
->
resp
,
req
->
ws
,
req
->
vsl
,
SLT_RespMethod
);
http_FilterResp
(
req
->
obj
->
http
,
req
->
resp
,
0
);
...
...
@@ -111,7 +111,7 @@ cnt_deliver(struct worker *wrk, struct req *req)
if
(
req
->
wrk
->
stats
.
cache_hit
)
http_PrintfHeader
(
req
->
resp
,
"X-Varnish: %u %u"
,
VXID
(
req
->
vsl
->
wid
),
VXID
(
ObjGetXID
(
req
->
obj
->
obj
core
,
&
wrk
->
stats
)));
VXID
(
ObjGetXID
(
req
->
objcore
,
&
wrk
->
stats
)));
else
http_PrintfHeader
(
req
->
resp
,
"X-Varnish: %u"
,
VXID
(
req
->
vsl
->
wid
));
...
...
@@ -124,7 +124,7 @@ cnt_deliver(struct worker *wrk, struct req *req)
age. Truncate to zero in that case).
*/
http_PrintfHeader
(
req
->
resp
,
"Age: %.0f"
,
fmax
(
0
.,
req
->
t_prev
-
req
->
obj
->
obj
core
->
exp
.
t_origin
));
fmax
(
0
.,
req
->
t_prev
-
req
->
objcore
->
exp
.
t_origin
));
http_SetHeader
(
req
->
resp
,
"Via: 1.1 varnish-v4"
);
...
...
@@ -140,7 +140,7 @@ cnt_deliver(struct worker *wrk, struct req *req)
wrk
->
handling
=
VCL_RET_DELIVER
;
if
(
wrk
->
handling
!=
VCL_RET_DELIVER
)
{
assert
(
req
->
obj
->
obj
core
==
req
->
objcore
);
assert
(
req
->
objcore
==
req
->
objcore
);
(
void
)
HSH_DerefObjCore
(
&
wrk
->
stats
,
&
req
->
objcore
);
req
->
obj
=
NULL
;
http_Teardown
(
req
->
resp
);
...
...
@@ -161,7 +161,7 @@ cnt_deliver(struct worker *wrk, struct req *req)
assert
(
wrk
->
handling
==
VCL_RET_DELIVER
);
if
(
!
(
req
->
obj
->
obj
core
->
flags
&
OC_F_PASS
)
if
(
!
(
req
->
objcore
->
flags
&
OC_F_PASS
)
&&
req
->
esi_level
==
0
&&
http_GetStatus
(
req
->
obj
->
http
)
==
200
&&
req
->
http
->
conds
&&
RFC2616_Do_Cond
(
req
))
{
...
...
@@ -170,7 +170,7 @@ cnt_deliver(struct worker *wrk, struct req *req)
}
/* Grab a ref to the bo if there is one, and hand it down */
bo
=
HSH_RefBusy
(
req
->
obj
->
obj
core
);
bo
=
HSH_RefBusy
(
req
->
objcore
);
V1D_Deliver
(
req
,
bo
);
if
(
bo
!=
NULL
)
VBO_DerefBusyObj
(
req
->
wrk
,
&
bo
);
...
...
@@ -180,19 +180,19 @@ cnt_deliver(struct worker *wrk, struct req *req)
if
(
http_HdrIs
(
req
->
resp
,
H_Connection
,
"close"
))
req
->
doclose
=
SC_RESP_CLOSE
;
if
(
req
->
obj
->
obj
core
->
flags
&
OC_F_PASS
)
{
if
(
req
->
objcore
->
flags
&
OC_F_PASS
)
{
/*
* No point in saving the body if it is hit-for-pass,
* but we can't yank it until the fetching thread has
* finished/abandoned also.
*/
while
(
req
->
obj
->
obj
core
->
busyobj
!=
NULL
)
while
(
req
->
objcore
->
busyobj
!=
NULL
)
(
void
)
usleep
(
100000
);
STV_Freestore
(
req
->
obj
);
}
assert
(
WRW_IsReleased
(
wrk
));
VSLb
(
req
->
vsl
,
SLT_Debug
,
"XXX REF %d"
,
req
->
obj
->
obj
core
->
refcnt
);
VSLb
(
req
->
vsl
,
SLT_Debug
,
"XXX REF %d"
,
req
->
objcore
->
refcnt
);
assert
(
req
->
obj
->
objcore
==
req
->
objcore
);
(
void
)
HSH_DerefObjCore
(
&
wrk
->
stats
,
&
req
->
objcore
);
req
->
obj
=
NULL
;
...
...
@@ -409,7 +409,7 @@ cnt_lookup(struct worker *wrk, struct req *req)
/* Found a hit-for-pass */
VSLb
(
req
->
vsl
,
SLT_Debug
,
"XXXX HIT-FOR-PASS"
);
VSLb
(
req
->
vsl
,
SLT_HitPass
,
"%u"
,
VXID
(
ObjGetXID
(
req
->
obj
->
obj
core
,
&
wrk
->
stats
)));
VXID
(
ObjGetXID
(
req
->
objcore
,
&
wrk
->
stats
)));
AZ
(
boc
);
assert
(
req
->
obj
->
objcore
==
req
->
objcore
);
(
void
)
HSH_DerefObjCore
(
&
wrk
->
stats
,
&
req
->
objcore
);
...
...
@@ -423,7 +423,7 @@ cnt_lookup(struct worker *wrk, struct req *req)
CHECK_OBJ_NOTNULL
(
oh
,
OBJHEAD_MAGIC
);
VSLb
(
req
->
vsl
,
SLT_Hit
,
"%u"
,
VXID
(
ObjGetXID
(
req
->
obj
->
obj
core
,
&
wrk
->
stats
)));
VXID
(
ObjGetXID
(
req
->
objcore
,
&
wrk
->
stats
)));
VCL_hit_method
(
req
->
vcl
,
wrk
,
req
,
NULL
,
req
->
http
->
ws
);
...
...
bin/varnishd/cache/cache_rfc2616.c
View file @
d717b1bc
...
...
@@ -355,7 +355,7 @@ RFC2616_Do_Cond(const struct req *req)
ims
=
VTIM_parse
(
p
);
if
(
ims
>
req
->
t_req
)
/* [RFC2616 14.25] */
return
(
0
);
lm
=
ObjGetLastModified
(
req
->
obj
->
obj
core
,
&
req
->
wrk
->
stats
);
lm
=
ObjGetLastModified
(
req
->
objcore
,
&
req
->
wrk
->
stats
);
if
(
lm
>
ims
)
return
(
0
);
do_cond
=
1
;
...
...
bin/varnishd/cache/cache_vrt.c
View file @
d717b1bc
...
...
@@ -500,7 +500,7 @@ VRT_purge(const struct vrt_ctx *ctx, double ttl, double grace, double keep)
CHECK_OBJ_NOTNULL
(
ctx
->
req
,
REQ_MAGIC
);
CHECK_OBJ_NOTNULL
(
ctx
->
req
->
wrk
,
WORKER_MAGIC
);
if
(
ctx
->
method
==
VCL_MET_HIT
)
HSH_Purge
(
ctx
->
req
->
wrk
,
ctx
->
req
->
obj
->
obj
core
->
objhead
,
HSH_Purge
(
ctx
->
req
->
wrk
,
ctx
->
req
->
objcore
->
objhead
,
ttl
,
grace
,
keep
);
else
if
(
ctx
->
method
==
VCL_MET_MISS
)
HSH_Purge
(
ctx
->
req
->
wrk
,
ctx
->
req
->
objcore
->
objhead
,
...
...
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