Commit 99016d84 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Move pan_vdp() to VDP_Panic()

parent 4232439a
......@@ -34,6 +34,33 @@
#include "cache_varnishd.h"
#include "cache_filter.h"
void
VDP_Panic(struct vsb *vsb, const struct vdp_ctx *vdc)
{
struct vdp_entry *vde;
VSB_printf(vsb, "vdc = %p {\n", vdc);
VSB_indent(vsb, 2);
PAN_CheckMagic(vsb, vdc, VDP_CTX_MAGIC);
VSB_printf(vsb, "nxt = %p,\n", vdc->nxt);
VSB_printf(vsb, "retval = %d,\n", vdc->retval);
if (!VTAILQ_EMPTY(&vdc->vdp)) {
VSB_cat(vsb, "filters = {\n");
VSB_indent(vsb, 2);
VTAILQ_FOREACH(vde, &vdc->vdp, list)
VSB_printf(vsb, "%s = %p { priv = %p }\n",
vde->vdp->name, vde, vde->priv);
VSB_indent(vsb, -2);
VSB_cat(vsb, "},\n");
}
VSB_indent(vsb, -2);
VSB_cat(vsb, "},\n");
}
void
VDP_Init(struct vdp_ctx *vdc, struct worker *wrk, struct vsl_log *vsl,
struct req *req)
......
......@@ -344,31 +344,6 @@ pan_vfp(struct vsb *vsb, const struct vfp_ctx *vfc)
VSB_cat(vsb, "},\n");
}
static void
pan_vdp(struct vsb *vsb, const struct vdp_ctx *vdc)
{
struct vdp_entry *vde;
VSB_printf(vsb, "vdc = %p {\n", vdc);
VSB_indent(vsb, 2);
PAN_CheckMagic(vsb, vdc, VDP_CTX_MAGIC);
VSB_printf(vsb, "nxt = %p,\n", vdc->nxt);
VSB_printf(vsb, "retval = %d,\n", vdc->retval);
if (!VTAILQ_EMPTY(&vdc->vdp)) {
VSB_cat(vsb, "filters = {\n");
VSB_indent(vsb, 2);
VTAILQ_FOREACH(vde, &vdc->vdp, list)
VSB_printf(vsb, "%s = %p { priv = %p }\n",
vde->vdp->name, vde, vde->priv);
VSB_indent(vsb, -2);
VSB_cat(vsb, "},\n");
}
VSB_indent(vsb, -2);
VSB_cat(vsb, "},\n");
}
static void
pan_busyobj(struct vsb *vsb, const struct busyobj *bo)
{
......@@ -502,7 +477,7 @@ pan_req(struct vsb *vsb, const struct req *req)
if (req->resp != NULL && req->resp->ws != NULL)
pan_http(vsb, "resp", req->resp);
if (req->vdc != NULL)
pan_vdp(vsb, req->vdc);
VDP_Panic(vsb, req->vdc);
VCL_Panic(vsb, "vcl", req->vcl);
......
......@@ -173,6 +173,9 @@ void VDI_Panic(const struct director *, struct vsb *, const char *nm);
void VDI_Event(const struct director *d, enum vcl_event_e ev);
void VDI_Init(void);
/* cache_deliver_proc.c */
void VDP_Panic(struct vsb *vsb, const struct vdp_ctx *vdc);
/* cache_exp.c */
vtim_real EXP_Ttl(const struct req *, const struct objcore *);
vtim_real EXP_Ttl_grace(const struct req *, const struct objcore *oc);
......
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