From 311460ad2176d9fabc498b0e85a627f65109d650 Mon Sep 17 00:00:00 2001 From: phk Date: Sun, 18 Jan 2009 15:14:54 +0000 Subject: [PATCH] Don't list gone bans. Emit && \ for line continuation. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3517 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache_ban.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/varnish-cache/bin/varnishd/cache_ban.c b/varnish-cache/bin/varnishd/cache_ban.c index f97a571b..0a0b33ba 100644 --- a/varnish-cache/bin/varnishd/cache_ban.c +++ b/varnish-cache/bin/varnishd/cache_ban.c @@ -518,14 +518,16 @@ ccf_purge_list(struct cli *cli, const char * const *av, void *priv) 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); -- 2.39.5