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

tfheen at projects.linpro.no tfheen at projects.linpro.no
Mon Feb 9 14:15:50 CET 2009


Author: tfheen
Date: 2009-02-09 14:15:50 +0100 (Mon, 09 Feb 2009)
New Revision: 3710

Modified:
   branches/2.0/varnish-cache/bin/varnishd/cache_ban.c
Log:
Merge r3522: List referenced, but gone purges, mark them with a "G"



Modified: branches/2.0/varnish-cache/bin/varnishd/cache_ban.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/cache_ban.c	2009-02-09 13:10:34 UTC (rev 3709)
+++ branches/2.0/varnish-cache/bin/varnishd/cache_ban.c	2009-02-09 13:15:50 UTC (rev 3710)
@@ -415,7 +415,6 @@
 	}
 	Lck_Lock(&ban_mtx);
 	be->refcount--;
-	/* XXX: We should check if the tail can be removed */
 	VSL_stats->n_purge_dups += pcount;
 	Lck_Unlock(&ban_mtx);
 }
@@ -634,10 +633,12 @@
 	} while (b != NULL);
 
 	VTAILQ_FOREACH(b, &ban_head, list) {
-		if (b->flags & BAN_F_GONE)
+		if (b->refcount == 0 && (b->flags & BAN_F_GONE))
 			continue;
 		bt = VTAILQ_FIRST(&b->tests);
-		cli_out(cli, "%5u\t%s", b->refcount, bt->test);
+		cli_out(cli, "%5u%s\t%s", b->refcount,
+		    b->flags & BAN_F_GONE ? "G" : " ",
+		    bt->test);
 		do {
 			bt = VTAILQ_NEXT(bt, list);
 			if (bt != NULL)



More information about the varnish-commit mailing list