r3623 - branches/2.0/varnish-cache/lib/libvarnish

tfheen at projects.linpro.no tfheen at projects.linpro.no
Thu Feb 5 13:26:37 CET 2009


Author: tfheen
Date: 2009-02-05 13:26:36 +0100 (Thu, 05 Feb 2009)
New Revision: 3623

Modified:
   branches/2.0/varnish-cache/lib/libvarnish/subproc.c
Log:
Merge r3416: Make it possible to supress all or no lines of output



Modified: branches/2.0/varnish-cache/lib/libvarnish/subproc.c
===================================================================
--- branches/2.0/varnish-cache/lib/libvarnish/subproc.c	2009-02-05 12:23:06 UTC (rev 3622)
+++ branches/2.0/varnish-cache/lib/libvarnish/subproc.c	2009-02-05 12:26:36 UTC (rev 3623)
@@ -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