Commit dc6f44ce authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Finally, make VDP_Close() take vdp_ctx instead of req arg.

parent ff82e01a
......@@ -149,18 +149,16 @@ VDP_Push(struct vdp_ctx *vdc, struct ws *ws, const struct vdp *vdp, void *priv)
}
uint64_t
VDP_Close(struct req *req)
VDP_Close(struct vdp_ctx *vdc)
{
struct vdp_entry *vdpe;
struct vdp_ctx *vdc;
uint64_t rv = 0;
CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
vdc = req->vdc;
CHECK_OBJ_NOTNULL(vdc, VDP_CTX_MAGIC);
while (!VTAILQ_EMPTY(&vdc->vdp)) {
vdpe = VTAILQ_FIRST(&vdc->vdp);
rv = vdpe->bytes_in;
VSLb(req->vsl, SLT_VdpAcct, "%s %ju %ju", vdpe->vdp->name,
VSLb(vdc->vsl, SLT_VdpAcct, "%s %ju %ju", vdpe->vdp->name,
(uintmax_t)vdpe->calls, (uintmax_t)rv);
if (vdc->retval >= 0)
AN(vdpe);
......
......@@ -880,5 +880,5 @@ ved_deliver(struct req *req, struct boc *boc, int wantbody)
if (i && req->doclose == SC_NULL)
req->doclose = SC_REM_CLOSE;
req->acct.resp_bodybytes += VDP_Close(req);
req->acct.resp_bodybytes += VDP_Close(req->vdc);
}
......@@ -155,7 +155,7 @@ extern const struct vdp VDP_range;
void VDP_Init(struct vdp_ctx *vdx, struct worker *wrk, struct vsl_log *vsl,
struct req *req);
uint64_t VDP_Close(struct req *req);
uint64_t VDP_Close(struct vdp_ctx *);
int VDP_DeliverObj(struct vdp_ctx *vdc, struct objcore *oc);
int VDP_bytes(struct vdp_ctx *, enum vdp_action act, const void *ptr, ssize_t len);
......
......@@ -158,7 +158,7 @@ V1D_Deliver(struct req *req, struct boc *boc, int sendbody)
AZ(req->wrk->v1l);
req->acct.resp_hdrbytes += hdrbytes;
req->acct.resp_bodybytes += VDP_Close(req);
req->acct.resp_bodybytes += VDP_Close(req->vdc);
if (sc == SC_NULL && err && req->sp->fd >= 0)
sc = SC_REM_CLOSE;
......
......@@ -339,5 +339,5 @@ h2_deliver(struct req *req, struct boc *boc, int sendbody)
}
AZ(req->wrk->v1l);
req->acct.resp_bodybytes += VDP_Close(req);
req->acct.resp_bodybytes += VDP_Close(req->vdc);
}
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