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
1551a2d1
Commit
1551a2d1
authored
Dec 09, 2015
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use ObjIterate()
parent
ef146407
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
31 deletions
+8
-31
cache_deliver_proc.c
bin/varnishd/cache/cache_deliver_proc.c
+8
-31
No files found.
bin/varnishd/cache/cache_deliver_proc.c
View file @
1551a2d1
...
...
@@ -114,40 +114,17 @@ VDP_close(struct req *req)
/*--------------------------------------------------------------------*/
static
int
__match_proto__
(
objiterate_f
)
vdp_objiterator
(
void
*
priv
,
int
flush
,
const
void
*
ptr
,
ssize_t
len
)
{
return
(
VDP_bytes
(
priv
,
flush
?
VDP_FLUSH
:
VDP_NULL
,
ptr
,
len
));
}
int
VDP_DeliverObj
(
struct
req
*
req
)
{
enum
objiter_status
ois
;
int
err
=
0
;
ssize_t
len
;
void
*
oi
;
void
*
ptr
;
CHECK_OBJ_NOTNULL
(
req
,
REQ_MAGIC
);
oi
=
ObjIterBegin
(
req
->
wrk
,
req
->
objcore
);
XXXAN
(
oi
);
do
{
ois
=
ObjIter
(
req
->
objcore
,
oi
,
&
ptr
,
&
len
);
switch
(
ois
)
{
case
OIS_DONE
:
AZ
(
len
);
break
;
case
OIS_ERROR
:
err
=
-
1
;
break
;
case
OIS_DATA
:
case
OIS_STREAM
:
if
(
VDP_bytes
(
req
,
ois
==
OIS_DATA
?
VDP_NULL
:
VDP_FLUSH
,
ptr
,
len
))
ois
=
OIS_ERROR
;
break
;
default:
WRONG
(
"Wrong OIS value"
);
}
}
while
(
ois
==
OIS_DATA
||
ois
==
OIS_STREAM
);
(
void
)
VDP_bytes
(
req
,
VDP_FLUSH
,
NULL
,
0
);
ObjIterEnd
(
req
->
objcore
,
&
oi
);
return
(
err
);
return
(
ObjIterate
(
req
->
wrk
,
req
->
objcore
,
req
,
vdp_objiterator
));
}
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