[PATCH 5/7] Export the ban list on shutdown to compact it

Martin Blix Grydeland martin at varnish-software.com
Mon Dec 3 11:09:53 CET 2012


---
 bin/varnishd/cache/cache_ban.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/bin/varnishd/cache/cache_ban.c b/bin/varnishd/cache/cache_ban.c
index e1b60e0..489f33c 100644
--- a/bin/varnishd/cache/cache_ban.c
+++ b/bin/varnishd/cache/cache_ban.c
@@ -1280,4 +1280,9 @@ BAN_Shutdown(void)
 
 	AZ(pthread_join(ban_thread, &status));
 	AZ(status);
+
+	Lck_Lock(&ban_mtx);
+	/* Export the ban list to compact it */
+	ban_export();
+	Lck_Unlock(&ban_mtx);
 }
-- 
1.7.10.4




More information about the varnish-dev mailing list