From 48c8159de9a60408c30a0f5f1304513ff76ad10d Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Tue, 6 May 2008 10:41:00 -0400 Subject: [PATCH] - Process failtickets as long as failmanager is not empty. git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_8@676 a942ae1a-1317-0410-a47c-b1dcaea8d605 Conflicts: ChangeLog --- ChangeLog | 1 + server/filtergamin.py | 5 +++-- server/filterpoll.py | 5 +++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index bf80dd18..f9c82d8e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,7 @@ Fail2Ban (version 0.8.2) 2008/03/06 From ver. 0.8.3 (2008/??/??) - stable ---------- +- Process failtickets as long as failmanager is not empty. - Fixed PID file while started in daemon mode. Thanks to Christian Jobic who submitted a similar patch. - Fixed "fail2ban-client get logpath". Bug #1916986. diff --git a/server/filtergamin.py b/server/filtergamin.py index 635ebb70..87d7f7a3 100644 --- a/server/filtergamin.py +++ b/server/filtergamin.py @@ -108,8 +108,9 @@ class FilterGamin(FileFilter): if self.__modified: try: - ticket = self.failManager.toBan() - self.jail.putFailTicket(ticket) + while True: + ticket = self.failManager.toBan() + self.jail.putFailTicket(ticket) except FailManagerEmpty: self.failManager.cleanup(MyTime.time()) self.dateDetector.sortTemplate() diff --git a/server/filterpoll.py b/server/filterpoll.py index 98ad0296..6fa61678 100644 --- a/server/filterpoll.py +++ b/server/filterpoll.py @@ -103,8 +103,9 @@ class FilterPoll(FileFilter): if self.__modified: try: - ticket = self.failManager.toBan() - self.jail.putFailTicket(ticket) + while True: + ticket = self.failManager.toBan() + self.jail.putFailTicket(ticket) except FailManagerEmpty: self.failManager.cleanup(MyTime.time()) self.dateDetector.sortTemplate()