r3706 - branches/2.0/varnish-cache/bin/varnishd

tfheen at projects.linpro.no tfheen at projects.linpro.no
Mon Feb 9 13:50:43 CET 2009


Author: tfheen
Date: 2009-02-09 13:50:42 +0100 (Mon, 09 Feb 2009)
New Revision: 3706

Modified:
   branches/2.0/varnish-cache/bin/varnishd/cache_ban.c
Log:
Merge r3517: Don't list gone bans.

Emit && \ for line continuation.



Modified: branches/2.0/varnish-cache/bin/varnishd/cache_ban.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/cache_ban.c	2009-02-09 12:46:48 UTC (rev 3705)
+++ branches/2.0/varnish-cache/bin/varnishd/cache_ban.c	2009-02-09 12:50:42 UTC (rev 3706)
@@ -518,14 +518,16 @@
 	Lck_Unlock(&ban_mtx);
 
 	VTAILQ_FOREACH(b, &ban_head, list) {
+		if (b->flags & BAN_F_GONE)
+			continue;
 		bt = VTAILQ_FIRST(&b->tests);
-		cli_out(cli, "%5u %4s\t%s\n",
-		    b->refcount, b->flags ? "Gone" : "", bt->test);
+		cli_out(cli, "%5u\t%s", b->refcount, bt->test);
 		do {
 			bt = VTAILQ_NEXT(bt, list);
 			if (bt != NULL)
-				cli_out(cli, "\t\t%s\n", bt->test);
+				cli_out(cli, " && \\\n\t%s", bt->test);
 		} while (bt != NULL);
+		cli_out(cli, "\n");
 	}
 
 	Lck_Lock(&ban_mtx);



More information about the varnish-commit mailing list