Commit 4c1625d8 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Give VDP_push() a string ID argument for debugging.

parent f6a7b615
......@@ -56,7 +56,8 @@ VDP_bytes(struct req *req, enum vdp_action act, const void *ptr, ssize_t len)
}
void
VDP_push(struct req *req, vdp_bytes *func, void *priv, int bottom)
VDP_push(struct req *req, vdp_bytes *func, void *priv, int bottom,
const char *id)
{
struct vdp_entry *vdp;
......@@ -79,6 +80,7 @@ VDP_push(struct req *req, vdp_bytes *func, void *priv, int bottom)
INIT_OBJ(vdp, VDP_ENTRY_MAGIC);
vdp->func = func;
vdp->priv = priv;
vdp->id = id;
if (bottom)
VTAILQ_INSERT_TAIL(&req->vdp, vdp, list);
else
......
......@@ -778,9 +778,9 @@ VED_Deliver(struct req *req, struct boc *boc, int wantbody)
ved_stripgzip(req, boc);
} else {
if (ecx->isgzip && !i)
VDP_push(req, ved_pretend_gzip, ecx, 1);
VDP_push(req, ved_pretend_gzip, ecx, 1, "PGZ");
else
VDP_push(req, ved_vdp_bytes, ecx->preq, 1);
VDP_push(req, ved_vdp_bytes, ecx->preq, 1, "VED");
(void)VDP_DeliverObj(req);
(void)VDP_bytes(req, VDP_FLUSH, NULL, 0);
}
......
......@@ -103,11 +103,13 @@ struct vdp_entry {
#define VDP_ENTRY_MAGIC 0x353eb781
vdp_bytes *func;
void *priv;
const char *id;
VTAILQ_ENTRY(vdp_entry) list;
};
int VDP_bytes(struct req *, enum vdp_action act, const void *ptr, ssize_t len);
void VDP_push(struct req *, vdp_bytes *func, void *priv, int bottom);
void VDP_push(struct req *, vdp_bytes *func, void *priv, int bottom,
const char *id);
void VDP_close(struct req *req);
int VDP_DeliverObj(struct req *req);
......
......@@ -169,7 +169,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;
VDP_push(req, vrg_range_bytes, vrg_priv, 1);
VDP_push(req, vrg_range_bytes, vrg_priv, 1, "RNG");
http_PutResponse(req->resp, "HTTP/1.1", 206, NULL);
return (NULL);
}
......
......@@ -269,12 +269,12 @@ 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);
VDP_push(req, VDP_ESI, NULL, 0, "ESI");
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);
VDP_push(req, VDP_gunzip, NULL, 1, "GUZ");
if (cache_param->http_range_support &&
http_IsStatus(req->resp, 200)) {
......
......@@ -112,7 +112,7 @@ V1D_Deliver(struct req *req, struct boc *boc, int sendbody)
http_SetHeader(req->resp, "Connection: keep-alive");
if (sendbody && req->resp_len != 0)
VDP_push(req, v1d_bytes, NULL, 1);
VDP_push(req, v1d_bytes, NULL, 1, "V1B");
AZ(req->wrk->v1l);
V1L_Reserve(req->wrk, req->ws, &req->sp->fd, req->vsl, req->t_prev);
......
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