diff options
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/standalone/drakids | 33 | ||||
-rw-r--r-- | perl-install/standalone/net_applet | 5 |
2 files changed, 13 insertions, 25 deletions
diff --git a/perl-install/standalone/drakids b/perl-install/standalone/drakids index 2d68321e9..990d2a268 100644 --- a/perl-install/standalone/drakids +++ b/perl-install/standalone/drakids @@ -40,26 +40,17 @@ $whitelist->get_column(0)->signal_connect('clicked', \&sort_by_column, $whitelis $whitelist->get_column(0)->set_sort_column_id(0); my $activefw = network::activefw->new(sub { - my ($con, $msg) = @_; - handle_blacklist($msg->get_args_list) if - $msg->get_interface eq "com.mandrakesoft.activefirewall" && - $msg->get_path eq "/com/mandrakesoft/activefirewall" && - $msg->get_member eq "Blacklist"; - - handle_whitelist($msg->get_args_list) if - $msg->get_interface eq "com.mandrakesoft.activefirewall" && - $msg->get_path eq "/com/mandrakesoft/activefirewall" && - $msg->get_member eq "Whitelist"; - - clear_lists() if - $msg->get_interface eq "com.mandrakesoft.activefirewall" && - $msg->get_path eq "/com/mandrakesoft/activefirewall" && - $msg->get_member eq "Clear"; - - handle_init() if - $msg->get_interface eq "com.mandrakesoft.activefirewall" && - $msg->get_path eq "/com/mandrakesoft/activefirewall" && - $msg->get_member eq "Init"; + my ($_con, $msg) = @_; + my $member = $msg->get_member; + if ($member eq 'Blacklist') { + handle_blacklist($msg->get_args_list); + } elsif ($member eq 'Whitelist') { + handle_whitelist($msg->get_args_list); + } elsif ($member eq 'Clear') { + clear_lists(); + } elsif ($member eq 'Init') { + handle_init(); + } }); init_lists(); @@ -99,7 +90,7 @@ sub sort_by_column { } sub handle_init { - $activefw->find_daemon; + $activefw->attach_daemon; init_lists(); } diff --git a/perl-install/standalone/net_applet b/perl-install/standalone/net_applet index 03b5cba10..37300d5a5 100644 --- a/perl-install/standalone/net_applet +++ b/perl-install/standalone/net_applet @@ -112,10 +112,7 @@ my @attacks_queue; if ($enable_activefw) { $activefw = network::activefw->new(sub { my ($_con, $msg) = @_; - handle_attack($msg->get_args_list) if - $msg->get_interface eq "com.mandrakesoft.activefirewall" && - $msg->get_path eq "/com/mandrakesoft/activefirewall" && - $msg->get_member eq "Attack"; + handle_attack($msg->get_args_list) if $msg->get_member eq "Attack"; }); } |