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
a86fd4f6
Commit
a86fd4f6
authored
Oct 23, 2014
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Eliminate VDP_FINISH, it's unmanageable and we have VDP_FINI
parent
a6b63457
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
22 deletions
+16
-22
cache_deliver_proc.c
bin/varnishd/cache/cache_deliver_proc.c
+1
-0
cache_filter.h
bin/varnishd/cache/cache_filter.h
+4
-5
cache_gzip.c
bin/varnishd/cache/cache_gzip.c
+11
-16
cache_http1_deliver.c
bin/varnishd/http1/cache_http1_deliver.c
+0
-1
No files found.
bin/varnishd/cache/cache_deliver_proc.c
View file @
a86fd4f6
...
...
@@ -39,6 +39,7 @@ VDP_bytes(struct req *req, enum vdp_action act, const void *ptr, ssize_t len)
struct
vdp_entry
*
vdp
;
CHECK_OBJ_NOTNULL
(
req
,
REQ_MAGIC
);
assert
(
act
==
VDP_NULL
||
act
==
VDP_FLUSH
);
vdp
=
req
->
vdp_nxt
;
CHECK_OBJ_NOTNULL
(
vdp
,
VDP_ENTRY_MAGIC
);
req
->
vdp_nxt
=
VTAILQ_NEXT
(
vdp
,
list
);
...
...
bin/varnishd/cache/cache_filter.h
View file @
a86fd4f6
...
...
@@ -88,11 +88,10 @@ enum vfp_status VFP_GetStorage(struct vfp_ctx *, ssize_t *sz, uint8_t **ptr);
/* Deliver processors ------------------------------------------------*/
enum
vdp_action
{
VDP_INIT
,
VDP_FINI
,
VDP_NULL
,
VDP_FLUSH
,
VDP_FINISH
,
VDP_INIT
,
/* Happens on VDP_push() */
VDP_FINI
,
/* Happens on VDP_pop() */
VDP_NULL
,
/* Input buffer valid after call */
VDP_FLUSH
,
/* Input buffer will be invalidated */
};
typedef
int
vdp_bytes
(
struct
req
*
,
enum
vdp_action
,
void
**
priv
,
...
...
bin/varnishd/cache/cache_gzip.c
View file @
a86fd4f6
...
...
@@ -277,11 +277,11 @@ VDP_gunzip(struct req *req, enum vdp_action act, void **priv,
const
void
*
dp
;
struct
worker
*
wrk
;
struct
vgz
*
vg
;
int
retval
;
CHECK_OBJ_NOTNULL
(
req
,
REQ_MAGIC
);
wrk
=
req
->
wrk
;
CHECK_OBJ_NOTNULL
(
wrk
,
WORKER_MAGIC
);
if
(
act
==
VDP_INIT
)
{
vg
=
VGZ_NewUngzip
(
req
->
vsl
,
"U D -"
);
AN
(
vg
);
...
...
@@ -291,33 +291,28 @@ VDP_gunzip(struct req *req, enum vdp_action act, void **priv,
*
priv
=
vg
;
return
(
0
);
}
CAST_OBJ_NOTNULL
(
vg
,
*
priv
,
VGZ_MAGIC
);
AN
(
vg
->
m_buf
);
if
(
act
==
VDP_FINI
)
{
AZ
(
len
);
AZ
(
vg
->
m_len
);
(
void
)
VGZ_Destroy
(
&
vg
);
*
priv
=
NULL
;
return
(
0
);
}
AN
(
vg
->
m_buf
);
if
(
len
==
0
)
{
AN
(
act
>
VDP_NULL
);
retval
=
VDP_bytes
(
req
,
act
,
vg
->
m_buf
,
vg
->
m_len
);
vg
->
m_len
=
0
;
VGZ_Obuf
(
vg
,
vg
->
m_buf
,
vg
->
m_sz
);
return
(
retval
);
}
if
(
len
==
0
)
return
(
0
);
VGZ_Ibuf
(
vg
,
ptr
,
len
);
do
{
if
(
vg
->
m_len
==
vg
->
m_sz
)
vr
=
VGZ_STUCK
;
else
{
vr
=
VGZ_Gunzip
(
vg
,
&
dp
,
&
dl
);
vg
->
m_len
+=
dl
;
}
if
(
vr
<
VGZ_OK
)
return
(
-
1
);
if
(
vg
->
m_len
==
vg
->
m_sz
||
vr
==
VGZ_STUC
K
)
{
if
(
vg
->
m_len
==
vg
->
m_sz
||
vr
!=
VGZ_O
K
)
{
if
(
VDP_bytes
(
req
,
VDP_FLUSH
,
vg
->
m_buf
,
vg
->
m_len
))
return
(
-
1
);
vg
->
m_len
=
0
;
...
...
bin/varnishd/http1/cache_http1_deliver.c
View file @
a86fd4f6
...
...
@@ -222,7 +222,6 @@ v1d_WriteDirObj(struct req *req)
WRONG
(
"Wrong OIS value"
);
}
}
while
(
ois
==
OIS_DATA
||
ois
==
OIS_STREAM
);
(
void
)
VDP_bytes
(
req
,
VDP_FINISH
,
NULL
,
0
);
ObjIterEnd
(
req
->
objcore
,
&
oi
);
return
(
ois
);
}
...
...
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