[PATCH 13/15] Report bans transitioning to GONE through STV_BanInfo

Martin Blix Grydeland martin at varnish-software.com
Wed Nov 7 12:32:16 CET 2012


---
 bin/varnishd/cache/cache_ban.c |    2 ++
 bin/varnishd/common/common.h   |    3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/bin/varnishd/cache/cache_ban.c b/bin/varnishd/cache/cache_ban.c
index d13e5a6..48bde0e 100644
--- a/bin/varnishd/cache/cache_ban.c
+++ b/bin/varnishd/cache/cache_ban.c
@@ -459,6 +459,7 @@ BAN_Insert(struct ban *b)
 		if (memcmp(b->spec + 8, bi->spec + 8, ln - 8))
 			continue;
 		bi->flags |= BAN_F_GONE;
+		STV_BanInfo(BI_GONE, bi);
 		VSC_C_main->bans_gone++;
 		VSC_C_main->bans_dups++;
 	}
@@ -1016,6 +1017,7 @@ ban_lurker_work(struct worker *wrk, struct vsl_log *vsl, unsigned pass)
 		if (!(b->flags & BAN_F_REQ)) {
 			if (!(b->flags & BAN_F_GONE)) {
 				b->flags |= BAN_F_GONE;
+				STV_BanInfo(BI_GONE, b);
 				VSC_C_main->bans_gone++;
 			}
 			if (DO_DEBUG(DBG_LURKER))
diff --git a/bin/varnishd/common/common.h b/bin/varnishd/common/common.h
index 8140734..d09c1d1 100644
--- a/bin/varnishd/common/common.h
+++ b/bin/varnishd/common/common.h
@@ -47,7 +47,8 @@
 
 enum baninfo {
 	BI_NEW,
-	BI_DROP
+	BI_DROP,
+	BI_GONE
 };
 
 struct cli;
-- 
1.7.9.5




More information about the varnish-dev mailing list