From: des Date: Wed, 2 May 2007 12:20:43 +0000 (+0000) Subject: Try fixing #95 again. The trick is that if we get a new SLT_VCL_call X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f26c99bf18beb0e801be3514169485dd1abf9817;p=varnish 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. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1374 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishlog/varnishlog.c b/varnish-cache/bin/varnishlog/varnishlog.c index b146e103..aa24ea07 100644 --- a/varnish-cache/bin/varnishlog/varnishlog.c +++ b/varnish-cache/bin/varnishlog/varnishlog.c @@ -113,8 +113,11 @@ h_order(void *priv, enum shmlogtag tag, unsigned fd, unsigned len, unsigned spec 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' : '-'),