Commit 8e5fd19d authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Remove last, now unused argument of VFP_Push()

parent cbc7cec6
......@@ -509,9 +509,9 @@ vbf_stp_fetchbody(struct worker *wrk, struct busyobj *bo)
/*--------------------------------------------------------------------
*/
#define vbf_vfp_push(bo, vfp, top) \
#define vbf_vfp_push(bo, vfp) \
do { \
if (VFP_Push((bo)->vfc, (vfp), (top)) == NULL) { \
if (VFP_Push((bo)->vfc, (vfp)) == NULL) { \
(bo)->htc->doclose = SC_OVERLOAD; \
VDI_Finish((bo)->wrk, bo); \
return (F_STP_ERROR); \
......@@ -573,19 +573,19 @@ vbf_stp_fetch(struct worker *wrk, struct busyobj *bo)
assert(bo->do_gzip == 0 || bo->do_gunzip == 0);
if (bo->do_gunzip || (bo->is_gzip && bo->do_esi))
vbf_vfp_push(bo, &vfp_gunzip, 1);
vbf_vfp_push(bo, &vfp_gunzip);
if (bo->htc->content_length != 0) {
if (bo->do_esi && bo->do_gzip) {
vbf_vfp_push(bo, &vfp_esi_gzip, 1);
vbf_vfp_push(bo, &vfp_esi_gzip);
} else if (bo->do_esi && bo->is_gzip && !bo->do_gunzip) {
vbf_vfp_push(bo, &vfp_esi_gzip, 1);
vbf_vfp_push(bo, &vfp_esi_gzip);
} else if (bo->do_esi) {
vbf_vfp_push(bo, &vfp_esi, 1);
vbf_vfp_push(bo, &vfp_esi);
} else if (bo->do_gzip) {
vbf_vfp_push(bo, &vfp_gzip, 1);
vbf_vfp_push(bo, &vfp_gzip);
} else if (bo->is_gzip && !bo->do_gunzip) {
vbf_vfp_push(bo, &vfp_testgunzip, 1);
vbf_vfp_push(bo, &vfp_testgunzip);
}
}
......
......@@ -195,7 +195,7 @@ VFP_Suck(struct vfp_ctx *vc, void *p, ssize_t *lp)
/*--------------------------------------------------------------------
*/
struct vfp_entry *
VFP_Push(struct vfp_ctx *vc, const struct vfp *vfp, int top)
VFP_Push(struct vfp_ctx *vc, const struct vfp *vfp)
{
struct vfp_entry *vfe;
......@@ -211,12 +211,8 @@ VFP_Push(struct vfp_ctx *vc, const struct vfp *vfp, int top)
INIT_OBJ(vfe, VFP_ENTRY_MAGIC);
vfe->vfp = vfp;
vfe->closed = VFP_OK;
if (top)
VTAILQ_INSERT_HEAD(&vc->vfp, vfe, list);
else
VTAILQ_INSERT_TAIL(&vc->vfp, vfe, list);
if (VTAILQ_FIRST(&vc->vfp) == vfe)
vc->vfp_nxt = vfe;
VTAILQ_INSERT_HEAD(&vc->vfp, vfe, list);
vc->vfp_nxt = vfe;
return (vfe);
}
......
......@@ -74,7 +74,7 @@ extern const struct vfp vfp_testgunzip;
extern const struct vfp vfp_esi;
extern const struct vfp vfp_esi_gzip;
struct vfp_entry *VFP_Push(struct vfp_ctx *, const struct vfp *, int top);
struct vfp_entry *VFP_Push(struct vfp_ctx *, const struct vfp *);
void VFP_Setup(struct vfp_ctx *vc);
int VFP_Open(struct vfp_ctx *bo);
void VFP_Close(struct vfp_ctx *bo);
......
......@@ -267,21 +267,21 @@ V1F_Setup_Fetch(struct vfp_ctx *vfc, struct http_conn *htc)
switch (htc->body_status) {
case BS_EOF:
assert(htc->content_length == -1);
vfe = VFP_Push(vfc, &v1f_eof, 0);
vfe = VFP_Push(vfc, &v1f_eof);
if (vfe == NULL)
return (ENOSPC);
vfe->priv2 = 0;
break;
case BS_LENGTH:
assert(htc->content_length > 0);
vfe = VFP_Push(vfc, &v1f_straight, 0);
vfe = VFP_Push(vfc, &v1f_straight);
if (vfe == NULL)
return (ENOSPC);
vfe->priv2 = htc->content_length;
break;
case BS_CHUNKED:
assert(htc->content_length == -1);
vfe = VFP_Push(vfc, &v1f_chunked, 0);
vfe = VFP_Push(vfc, &v1f_chunked);
if (vfe == NULL)
return (ENOSPC);
vfe->priv2 = -1;
......
......@@ -750,7 +750,7 @@ h2_req_body(struct req *req)
CHECK_OBJ(req, REQ_MAGIC);
CAST_OBJ_NOTNULL(r2, req->transport_priv, H2_REQ_MAGIC);
vfe = VFP_Push(req->vfc, &h2_body, 0);
vfe = VFP_Push(req->vfc, &h2_body);
AN(vfe);
vfe->priv1 = r2;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment