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)
...
@@ -39,6 +39,7 @@ VDP_bytes(struct req *req, enum vdp_action act, const void *ptr, ssize_t len)
struct
vdp_entry
*
vdp
;
struct
vdp_entry
*
vdp
;
CHECK_OBJ_NOTNULL
(
req
,
REQ_MAGIC
);
CHECK_OBJ_NOTNULL
(
req
,
REQ_MAGIC
);
assert
(
act
==
VDP_NULL
||
act
==
VDP_FLUSH
);
vdp
=
req
->
vdp_nxt
;
vdp
=
req
->
vdp_nxt
;
CHECK_OBJ_NOTNULL
(
vdp
,
VDP_ENTRY_MAGIC
);
CHECK_OBJ_NOTNULL
(
vdp
,
VDP_ENTRY_MAGIC
);
req
->
vdp_nxt
=
VTAILQ_NEXT
(
vdp
,
list
);
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);
...
@@ -88,11 +88,10 @@ enum vfp_status VFP_GetStorage(struct vfp_ctx *, ssize_t *sz, uint8_t **ptr);
/* Deliver processors ------------------------------------------------*/
/* Deliver processors ------------------------------------------------*/
enum
vdp_action
{
enum
vdp_action
{
VDP_INIT
,
VDP_INIT
,
/* Happens on VDP_push() */
VDP_FINI
,
VDP_FINI
,
/* Happens on VDP_pop() */
VDP_NULL
,
VDP_NULL
,
/* Input buffer valid after call */
VDP_FLUSH
,
VDP_FLUSH
,
/* Input buffer will be invalidated */
VDP_FINISH
,
};
};
typedef
int
vdp_bytes
(
struct
req
*
,
enum
vdp_action
,
void
**
priv
,
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,
...
@@ -277,11 +277,11 @@ VDP_gunzip(struct req *req, enum vdp_action act, void **priv,
const
void
*
dp
;
const
void
*
dp
;
struct
worker
*
wrk
;
struct
worker
*
wrk
;
struct
vgz
*
vg
;
struct
vgz
*
vg
;
int
retval
;
CHECK_OBJ_NOTNULL
(
req
,
REQ_MAGIC
);
CHECK_OBJ_NOTNULL
(
req
,
REQ_MAGIC
);
wrk
=
req
->
wrk
;
wrk
=
req
->
wrk
;
CHECK_OBJ_NOTNULL
(
wrk
,
WORKER_MAGIC
);
CHECK_OBJ_NOTNULL
(
wrk
,
WORKER_MAGIC
);
if
(
act
==
VDP_INIT
)
{
if
(
act
==
VDP_INIT
)
{
vg
=
VGZ_NewUngzip
(
req
->
vsl
,
"U D -"
);
vg
=
VGZ_NewUngzip
(
req
->
vsl
,
"U D -"
);
AN
(
vg
);
AN
(
vg
);
...
@@ -291,33 +291,28 @@ VDP_gunzip(struct req *req, enum vdp_action act, void **priv,
...
@@ -291,33 +291,28 @@ VDP_gunzip(struct req *req, enum vdp_action act, void **priv,
*
priv
=
vg
;
*
priv
=
vg
;
return
(
0
);
return
(
0
);
}
}
CAST_OBJ_NOTNULL
(
vg
,
*
priv
,
VGZ_MAGIC
);
CAST_OBJ_NOTNULL
(
vg
,
*
priv
,
VGZ_MAGIC
);
AN
(
vg
->
m_buf
);
if
(
act
==
VDP_FINI
)
{
if
(
act
==
VDP_FINI
)
{
AZ
(
len
);
AZ
(
vg
->
m_len
);
(
void
)
VGZ_Destroy
(
&
vg
);
(
void
)
VGZ_Destroy
(
&
vg
);
*
priv
=
NULL
;
*
priv
=
NULL
;
return
(
0
);
return
(
0
);
}
}
AN
(
vg
->
m_buf
);
if
(
len
==
0
)
{
if
(
len
==
0
)
AN
(
act
>
VDP_NULL
);
return
(
0
);
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
);
}
VGZ_Ibuf
(
vg
,
ptr
,
len
);
VGZ_Ibuf
(
vg
,
ptr
,
len
);
do
{
do
{
if
(
vg
->
m_len
==
vg
->
m_sz
)
vr
=
VGZ_STUCK
;
else
{
vr
=
VGZ_Gunzip
(
vg
,
&
dp
,
&
dl
);
vr
=
VGZ_Gunzip
(
vg
,
&
dp
,
&
dl
);
vg
->
m_len
+=
dl
;
vg
->
m_len
+=
dl
;
}
if
(
vr
<
VGZ_OK
)
if
(
vr
<
VGZ_OK
)
return
(
-
1
);
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
))
if
(
VDP_bytes
(
req
,
VDP_FLUSH
,
vg
->
m_buf
,
vg
->
m_len
))
return
(
-
1
);
return
(
-
1
);
vg
->
m_len
=
0
;
vg
->
m_len
=
0
;
...
...
bin/varnishd/http1/cache_http1_deliver.c
View file @
a86fd4f6
...
@@ -222,7 +222,6 @@ v1d_WriteDirObj(struct req *req)
...
@@ -222,7 +222,6 @@ v1d_WriteDirObj(struct req *req)
WRONG
(
"Wrong OIS value"
);
WRONG
(
"Wrong OIS value"
);
}
}
}
while
(
ois
==
OIS_DATA
||
ois
==
OIS_STREAM
);
}
while
(
ois
==
OIS_DATA
||
ois
==
OIS_STREAM
);
(
void
)
VDP_bytes
(
req
,
VDP_FINISH
,
NULL
,
0
);
ObjIterEnd
(
req
->
objcore
,
&
oi
);
ObjIterEnd
(
req
->
objcore
,
&
oi
);
return
(
ois
);
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