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
9011096f
Commit
9011096f
authored
Jan 21, 2016
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Eliminate unneeded boc argument
parent
38a635c4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
10 deletions
+10
-10
cache.h
bin/varnishd/cache/cache.h
+1
-1
cache_fetch_proc.c
bin/varnishd/cache/cache_fetch_proc.c
+1
-1
cache_obj.c
bin/varnishd/cache/cache_obj.c
+6
-6
cache_req_body.c
bin/varnishd/cache/cache_req_body.c
+1
-1
cache_req_fsm.c
bin/varnishd/cache/cache_req_fsm.c
+1
-1
No files found.
bin/varnishd/cache/cache.h
View file @
9011096f
...
...
@@ -852,7 +852,7 @@ typedef int objiterate_f(void *priv, int flush, const void *ptr, ssize_t len);
int
ObjIterate
(
struct
worker
*
,
struct
objcore
*
,
void
*
priv
,
objiterate_f
*
func
);
int
ObjGetSpace
(
struct
worker
*
,
struct
objcore
*
,
ssize_t
*
sz
,
uint8_t
**
ptr
);
void
ObjExtend
(
struct
worker
*
,
struct
objcore
*
,
s
truct
boc
*
,
s
size_t
l
);
void
ObjExtend
(
struct
worker
*
,
struct
objcore
*
,
ssize_t
l
);
ssize_t
ObjWaitExtend
(
struct
worker
*
,
struct
objcore
*
,
struct
boc
*
,
ssize_t
l
);
void
ObjSetState
(
const
struct
objcore
*
,
enum
boc_state_e
next
);
void
ObjWaitState
(
const
struct
objcore
*
,
enum
boc_state_e
want
);
...
...
bin/varnishd/cache/cache_fetch_proc.c
View file @
9011096f
...
...
@@ -98,7 +98,7 @@ VFP_Extend(const struct vfp_ctx *vc, ssize_t sz)
{
CHECK_OBJ_NOTNULL
(
vc
,
VFP_CTX_MAGIC
);
ObjExtend
(
vc
->
wrk
,
vc
->
oc
,
vc
->
bo
->
boc
,
sz
);
ObjExtend
(
vc
->
wrk
,
vc
->
oc
,
sz
);
}
/**********************************************************************
...
...
bin/varnishd/cache/cache_obj.c
View file @
9011096f
...
...
@@ -107,20 +107,20 @@ ObjGetSpace(struct worker *wrk, struct objcore *oc, ssize_t *sz, uint8_t **ptr)
*/
void
ObjExtend
(
struct
worker
*
wrk
,
struct
objcore
*
oc
,
s
truct
boc
*
boc
,
s
size_t
l
)
ObjExtend
(
struct
worker
*
wrk
,
struct
objcore
*
oc
,
ssize_t
l
)
{
const
struct
obj_methods
*
om
=
obj_getmethods
(
oc
);
CHECK_OBJ_NOTNULL
(
wrk
,
WORKER_MAGIC
);
CHECK_OBJ_ORNULL
(
oc
->
boc
,
BOC_MAGIC
);
AN
(
om
->
objextend
);
assert
(
l
>
0
);
if
(
boc
!=
NULL
)
{
CHECK_OBJ_NOTNULL
(
boc
,
BOC_MAGIC
);
Lck_Lock
(
&
boc
->
mtx
);
if
(
oc
->
boc
!=
NULL
)
{
Lck_Lock
(
&
oc
->
boc
->
mtx
);
om
->
objextend
(
wrk
,
oc
,
l
);
AZ
(
pthread_cond_broadcast
(
&
boc
->
cond
));
Lck_Unlock
(
&
boc
->
mtx
);
AZ
(
pthread_cond_broadcast
(
&
oc
->
boc
->
cond
));
Lck_Unlock
(
&
oc
->
boc
->
mtx
);
}
else
{
om
->
objextend
(
wrk
,
oc
,
l
);
}
...
...
bin/varnishd/cache/cache_req_body.c
View file @
9011096f
...
...
@@ -254,7 +254,7 @@ VRB_Cache(struct req *req, ssize_t maxsize)
req
->
acct
.
req_bodybytes
+=
l
;
if
(
yet
>=
l
)
yet
-=
l
;
ObjExtend
(
req
->
wrk
,
req
->
body_oc
,
NULL
,
l
);
ObjExtend
(
req
->
wrk
,
req
->
body_oc
,
l
);
}
}
while
(
vfps
==
VFP_OK
);
...
...
bin/varnishd/cache/cache_req_fsm.c
View file @
9011096f
...
...
@@ -291,7 +291,7 @@ cnt_synth(struct worker *wrk, struct req *req)
sz
=
szl
;
if
(
ObjGetSpace
(
wrk
,
req
->
objcore
,
&
sz
,
&
ptr
)
&&
sz
>=
szl
)
{
memcpy
(
ptr
,
VSB_data
(
synth_body
),
szl
);
ObjExtend
(
wrk
,
req
->
objcore
,
NULL
,
szl
);
ObjExtend
(
wrk
,
req
->
objcore
,
szl
);
}
else
szl
=
-
1
;
}
...
...
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