]> err.no Git - varnish/commitdiff
Try fixing #95 again. The trick is that if we get a new SLT_VCL_call
authordes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 2 May 2007 12:20:43 +0000 (12:20 +0000)
committerdes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 2 May 2007 12:20:43 +0000 (12:20 +0000)
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

varnish-cache/bin/varnishlog/varnishlog.c

index b146e1039f20ca79e1828cd221bd186c17a5ed6a..aa24ea07f4cbce9805cc39f9ac68b5470a5198b2 100644 (file)
@@ -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' : '-'),