r1374 - trunk/varnish-cache/bin/varnishlog

des at projects.linpro.no des at projects.linpro.no
Wed May 2 14:20:43 CEST 2007


Author: des
Date: 2007-05-02 14:20:43 +0200 (Wed, 02 May 2007)
New Revision: 1374

Modified:
   trunk/varnish-cache/bin/varnishlog/varnishlog.c
Log:
Try fixing #95 again.  The trick is that if we get a new SLT_VCL_call
while the F_INVCL flag is set, we need to insert a newline before the
entry for the new VCL_call.


Modified: trunk/varnish-cache/bin/varnishlog/varnishlog.c
===================================================================
--- trunk/varnish-cache/bin/varnishlog/varnishlog.c	2007-05-01 18:21:53 UTC (rev 1373)
+++ trunk/varnish-cache/bin/varnishlog/varnishlog.c	2007-05-02 12:20:43 UTC (rev 1374)
@@ -113,8 +113,11 @@
 		flg[fd] |= F_MATCH;
 	switch (tag) {
 	case SLT_VCL_call:
-		flg[fd] |= F_INVCL;
-		vsb_printf(ob[fd], "%5d %-12s %c %.*s\n",
+		if (flg[fd] & F_INVCL)
+			vsb_cat(ob[fd], "\n");
+		else
+			flg[fd] |= F_INVCL;
+		vsb_printf(ob[fd], "%5d %-12s %c %.*s",
 		    fd, VSL_tags[tag],
 		    ((spec & VSL_S_CLIENT) ? 'c' : \
 		    (spec & VSL_S_BACKEND) ? 'b' : '-'),




More information about the varnish-commit mailing list