[master] be7aa6d Implement the vxid_parent field of reported VSL transactions

Martin Blix Grydeland martin at varnish-cache.org
Thu Oct 3 14:00:41 CEST 2013


commit be7aa6df26ad6e081835f46f7eec326b03bcef9d
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date:   Wed Oct 2 22:03:49 2013 +0200

    Implement the vxid_parent field of reported VSL transactions

diff --git a/include/vapi/vsl.h b/include/vapi/vsl.h
index 84ba7c6..cee9307 100644
--- a/include/vapi/vsl.h
+++ b/include/vapi/vsl.h
@@ -69,7 +69,7 @@ enum VSL_transaction_e {
 struct VSL_transaction {
 	unsigned		level;
 	int32_t			vxid;
-	/* int32_t		vxid_parent; /\* XXX: Implement this *\/ */
+	int32_t			vxid_parent;
 	enum VSL_transaction_e	type;
 	struct VSL_cursor	*c;
 };
diff --git a/lib/libvarnishapi/vsl_dispatch.c b/lib/libvarnishapi/vsl_dispatch.c
index 055eefe..b6d77ff 100644
--- a/lib/libvarnishapi/vsl_dispatch.c
+++ b/lib/libvarnishapi/vsl_dispatch.c
@@ -750,6 +750,7 @@ vslq_callback(const struct VSLQ *vslq, struct vtx *vtx, VSLQ_dispatch_f *func,
 	vtxs[0] = vtx;
 	trans[0].level = 1;
 	trans[0].vxid = vtx->key.vxid;
+	trans[0].vxid_parent = 0;
 	trans[0].type = vtx->type;
 	trans[0].c = &vtx->c.cursor;
 	i = 1;
@@ -761,6 +762,7 @@ vslq_callback(const struct VSLQ *vslq, struct vtx *vtx, VSLQ_dispatch_f *func,
 			vtxs[i] = vtx;
 			trans[i].level = trans[j].level + 1;
 			trans[i].vxid = vtx->key.vxid;
+			trans[i].vxid_parent = trans[j].vxid;
 			trans[i].type = vtx->type;
 			trans[i].c = &vtx->c.cursor;
 			i++;



More information about the varnish-commit mailing list