[master] 679fe13 Export the ban list on shutdown to compact it

Martin Blix Grydeland martin at varnish-cache.org
Thu Dec 13 15:17:15 CET 2012


commit 679fe13a854d109e01e60aa7a47154e0c09b3b3f
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date:   Fri Nov 30 12:14:39 2012 +0100

    Export the ban list on shutdown to compact it

diff --git a/bin/varnishd/cache/cache_ban.c b/bin/varnishd/cache/cache_ban.c
index 09cd7d9..47e4f70 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);
 }



More information about the varnish-commit mailing list