Commit 6405cc21 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Remove VDP_push's "bottom" argument, we always build VDP stacks

from the top down.
parent 49e42d22
......@@ -74,7 +74,7 @@ VDP_bytes(struct req *req, enum vdp_action act, const void *ptr, ssize_t len)
}
int
VDP_push(struct req *req, const struct vdp *vdp, void *priv, int bottom)
VDP_Push(struct req *req, const struct vdp *vdp, void *priv)
{
struct vdp_entry *vdpe;
struct vdp_ctx *vdc;
......@@ -100,10 +100,7 @@ VDP_push(struct req *req, const struct vdp *vdp, void *priv, int bottom)
INIT_OBJ(vdpe, VDP_ENTRY_MAGIC);
vdpe->vdp = vdp;
vdpe->priv = priv;
if (bottom)
VTAILQ_INSERT_TAIL(&vdc->vdp, vdpe, list);
else
VTAILQ_INSERT_HEAD(&vdc->vdp, vdpe, list);
VTAILQ_INSERT_TAIL(&vdc->vdp, vdpe, list);
vdc->nxt = VTAILQ_FIRST(&vdc->vdp);
AZ(vdc->retval);
......
......@@ -833,9 +833,9 @@ ved_deliver(struct req *req, struct boc *boc, int wantbody)
ved_stripgzip(req, boc);
} else {
if (ecx->isgzip && !i)
(void)VDP_push(req, &ved_vdp_pgz, ecx, 1);
(void)VDP_Push(req, &ved_vdp_pgz, ecx);
else
(void)VDP_push(req, &ved_ved, ecx->preq, 1);
(void)VDP_Push(req, &ved_ved, ecx->preq);
(void)VDP_DeliverObj(req);
(void)VDP_bytes(req, VDP_FLUSH, NULL, 0);
}
......
......@@ -129,6 +129,6 @@ struct vdp_ctx {
};
int VDP_bytes(struct req *, enum vdp_action act, const void *ptr, ssize_t len);
int VDP_push(struct req *, const struct vdp *, void *priv, int bottom);
int VDP_Push(struct req *, const struct vdp *, void *priv);
void VRT_AddVDP(VRT_CTX, const struct vdp *);
void VRT_RemoveVDP(VRT_CTX, const struct vdp *);
......@@ -181,7 +181,7 @@ vrg_dorange(struct req *req, const char *r)
vrg_priv->range_off = 0;
vrg_priv->range_low = low;
vrg_priv->range_high = high + 1;
if (VDP_push(req, &vrg_vdp, vrg_priv, 1))
if (VDP_Push(req, &vrg_vdp, vrg_priv))
return ("WS too small");
http_PutResponse(req->resp, "HTTP/1.1", 206, NULL);
return (NULL);
......
......@@ -379,13 +379,13 @@ cnt_transmit(struct worker *wrk, struct req *req)
if (sendbody >= 0) {
if (!req->disable_esi && req->resp_len != 0 &&
ObjHasAttr(wrk, req->objcore, OA_ESIDATA) &&
VDP_push(req, &VDP_esi, NULL, 0) < 0)
VDP_Push(req, &VDP_esi, NULL) < 0)
err++;
if (cache_param->http_gzip_support &&
ObjCheckFlag(req->wrk, req->objcore, OF_GZIPED) &&
!RFC2616_Req_Gzip(req->http) &&
VDP_push(req, &VDP_gunzip, NULL, 1) < 0)
VDP_Push(req, &VDP_gunzip, NULL) < 0)
err++;
if (cache_param->http_range_support &&
......
......@@ -126,7 +126,7 @@ V1D_Deliver(struct req *req, struct boc *boc, int sendbody)
if (req->resp_len == 0)
sendbody = 0;
if (sendbody && VDP_push(req, &v1d_vdp, NULL, 1)) {
if (sendbody && VDP_Push(req, &v1d_vdp, NULL)) {
v1d_error(req, "workspace_thread overflow");
AZ(req->wrk->v1l);
return;
......
......@@ -301,7 +301,7 @@ h2_deliver(struct req *req, struct boc *boc, int sendbody)
/* XXX someone into H2 please add appropriate error handling */
if (sendbody) {
if (!VDP_push(req, &h2_vdp, NULL, 1))
if (!VDP_Push(req, &h2_vdp, NULL))
(void)VDP_DeliverObj(req);
}
......
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