[master] 5659c4d Don't loop to your self in synthesized Begin records.

Martin Blix Grydeland martin at varnish-software.com
Tue Feb 4 11:27:11 CET 2014

commit 5659c4d0900a522e729a6c9e573ed032e6b587fd
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date:   Tue Feb 4 11:25:04 2014 +0100

    Don't loop to your self in synthesized Begin records.
    This would cause the API to link this log record to itself, creating
    endless loops. Correct it by setting it to zero (meaning no parent).

diff --git a/lib/libvarnishapi/vsl_dispatch.c b/lib/libvarnishapi/vsl_dispatch.c
index c0ed3c9..0aee758 100644
--- a/lib/libvarnishapi/vsl_dispatch.c
+++ b/lib/libvarnishapi/vsl_dispatch.c
@@ -881,7 +881,7 @@ vtx_force(struct VSLQ *vslq, struct vtx *vtx, const char *reason)
 	vtx_scan(vslq, vtx);
 	if (!(vtx->flags & VTX_F_BEGIN))
 		vtx_synth_rec(vtx, SLT_Begin, "%s %u synth",
-		    vsl_t_names[vtx->type], vtx->key.vxid);
+		    vsl_t_names[vtx->type], 0);
 	vtx_diag(vtx, reason);
 	if (!(vtx->flags & VTX_F_END))
 		vtx_synth_rec(vtx, SLT_End, "synth");

More information about the varnish-commit mailing list