r3416 - trunk/varnish-cache/lib/libvarnish
phk at projects.linpro.no
phk at projects.linpro.no
Fri Nov 21 13:53:34 CET 2008
Author: phk
Date: 2008-11-21 13:53:34 +0100 (Fri, 21 Nov 2008)
New Revision: 3416
Modified:
trunk/varnish-cache/lib/libvarnish/subproc.c
Log:
Make it possible to supress all or no lines of output
Modified: trunk/varnish-cache/lib/libvarnish/subproc.c
===================================================================
--- trunk/varnish-cache/lib/libvarnish/subproc.c 2008-11-21 12:09:46 UTC (rev 3415)
+++ trunk/varnish-cache/lib/libvarnish/subproc.c 2008-11-21 12:53:34 UTC (rev 3416)
@@ -59,7 +59,7 @@
sp = priv;
if (!sp->lines++)
vsb_printf(sp->sb, "Message from %s:\n", sp->name);
- if (sp->maxlines > 0 && sp->lines <= sp->maxlines)
+ if (sp->maxlines < 0 || sp->lines <= sp->maxlines)
vsb_printf(sp->sb, "%s\n", str);
return (0);
}
@@ -108,7 +108,7 @@
continue;
AZ(close(p[0]));
VLU_Destroy(vlu);
- if (sp.lines > sp.maxlines)
+ if (sp.maxlines >= 0 && sp.lines > sp.maxlines)
vsb_printf(sb, "[%d lines truncated]\n",
sp.lines - sp.maxlines);
do {
More information about the varnish-commit
mailing list