#include <stdlib.h>
#include "cache.h"
+#include "vcl.h"
#ifndef WITHOUT_ASSERTS
};
static int nsteps = sizeof steps / sizeof *steps;
+/* dump a struct VCL_conf */
+static void
+dump_vcl(const struct VCL_conf *vcl)
+{
+ int i;
+
+ fp(" vcl = {\n");
+ fp(" srcname = {\n");
+ for (i = 0; i < vcl->nsrc; ++i)
+ fp(" \"%s\",\n", vcl->srcname[i]);
+ fp(" },\n");
+ fp(" },\n");
+}
+
/* dump a struct storage */
static void
dump_storage(const struct storage *st)
const struct backend *be = sp->backend;
#endif
const struct object *obj = sp->obj;
+ const struct VCL_conf *vcl = sp->vcl;
fp("sp = %p {\n", sp);
fp(" fd = %d, id = %d, xid = %u,\n", sp->fd, sp->id, sp->xid);
fp(" err_code = %d, err_reason = %s,\n", sp->err_code,
sp->err_reason ? sp->err_reason : "(null)");
+ if (VALID_OBJ(vcl, VCL_CONF_MAGIC))
+ dump_vcl(vcl);
+
#if 0
if (VALID_OBJ(be, BACKEND_MAGIC))
dump_backend(be);