Commit 276ca5e8 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Give VDP a proper VDP_Init() function

parent 0ac6be1b
......@@ -34,6 +34,13 @@
#include "cache_varnishd.h"
#include "cache_filter.h"
void
VDP_Init(struct vdp_ctx *vdx)
{
INIT_OBJ(vdx, VDP_CTX_MAGIC);
VTAILQ_INIT(&vdx->vdp);
}
/* VDP_bytes
*
* Pushes len bytes at ptr down the delivery processor list.
......@@ -57,6 +64,7 @@
* r == 0: Continue
* r > 0: Stop, breaks out early without error condition
*/
int
VDP_bytes(struct vdp_ctx *vdx, enum vdp_action act, const void *ptr, ssize_t len)
{
......
......@@ -148,6 +148,7 @@ struct vdp_ctx {
struct req *req;
};
void VDP_Init(struct vdp_ctx *vdx);
int VDP_bytes(struct vdp_ctx *, enum vdp_action act, const void *ptr, ssize_t len);
int VDP_Push(struct req *, const struct vdp *, void *priv);
void VRT_AddVDP(VRT_CTX, const struct vdp *);
......
......@@ -131,8 +131,7 @@ Req_New(const struct worker *wrk, struct sess *sp)
p = (void*)PRNDUP(p + sizeof(*req->htc));
req->vdc = (void*)p;
INIT_OBJ(req->vdc, VDP_CTX_MAGIC);
VTAILQ_INIT(&req->vdc->vdp);
VDP_Init(req->vdc);
p = (void*)PRNDUP(p + sizeof(*req->vdc));
req->htc = (void*)p;
......
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