From 77bf55ec6421e494138889788baedbd3be57a791 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Tue, 15 Feb 2005 18:33:17 +0000 Subject: clear blacklist when needed --- perl-install/standalone/drakids | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'perl-install/standalone/drakids') diff --git a/perl-install/standalone/drakids b/perl-install/standalone/drakids index 4b3d74172..e13c57c55 100644 --- a/perl-install/standalone/drakids +++ b/perl-install/standalone/drakids @@ -19,6 +19,11 @@ my $activefw = activefw->new(sub { $msg->get_interface eq "com.mandrakesoft.activefirewall" && $msg->get_path eq "/com/mandrakesoft/activefirewall" && $msg->get_member eq "Blacklist"; + + clear_blacklist() if + $msg->get_interface eq "com.mandrakesoft.activefirewall" && + $msg->get_path eq "/com/mandrakesoft/activefirewall" && + $msg->get_member eq "Clear"; }); my $blacklist = Gtk2::SimpleList->new(addr => 'hidden', @@ -58,6 +63,10 @@ sub init_blacklist { } } +sub clear_blacklist { + @{$blacklist->{data}} = (); +} + sub handle_blacklist { my ($timestamp, $indev, $prefix, $sensor, $protocol, $addr, $port, $icmp_type) = @_; push @{$blacklist->{data}}, [ -- cgit v1.2.1