diff options
author | Olivier Blin <oblin@mandriva.com> | 2009-02-25 16:21:47 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2009-02-25 16:21:47 +0000 |
commit | fcb4e42f06430b87c5fc7fcf9ebc21ea001c782a (patch) | |
tree | 74f400bc52e8906de0569c3ad2375357f1c03836 | |
parent | 975a708964d70d13ceef3cf27551a90e6201f4ef (diff) | |
download | drakx-net-fcb4e42f06430b87c5fc7fcf9ebc21ea001c782a.tar drakx-net-fcb4e42f06430b87c5fc7fcf9ebc21ea001c782a.tar.gz drakx-net-fcb4e42f06430b87c5fc7fcf9ebc21ea001c782a.tar.bz2 drakx-net-fcb4e42f06430b87c5fc7fcf9ebc21ea001c782a.tar.xz drakx-net-fcb4e42f06430b87c5fc7fcf9ebc21ea001c782a.zip |
check dbus interface before calling network status code
-rw-r--r-- | lib/network/connection_manager.pm | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/network/connection_manager.pm b/lib/network/connection_manager.pm index 46d2ea7..eb6614c 100644 --- a/lib/network/connection_manager.pm +++ b/lib/network/connection_manager.pm @@ -445,12 +445,14 @@ sub setup_dbus_handlers { $dbus->{connection}->add_filter( sub { my ($_con, $msg) = @_; - my $member = $msg->get_member; - my $message = _get_network_event_message($connections, $member, $msg->get_args_list); - $on_network_event->($message) if $on_network_event && $message; - my $cmanager = find { $_->{connection}->get_interface eq $interface } @$cmanagers - or return; - $cmanager->update_networks if $member eq 'status'; + if ($msg->get_interface eq 'com.mandriva.network') { + my $member = $msg->get_member; + my $message = _get_network_event_message($connections, $member, $msg->get_args_list); + $on_network_event->($message) if $on_network_event && $message; + my $cmanager = find { $_->{connection}->get_interface eq $interface } @$cmanagers + or return; + $cmanager->update_networks if $member eq 'status'; + } }); $dbus->{connection}->add_match("type='signal',interface='com.mandriva.network'"); dbus_object::set_gtk2_watch_helper($dbus); |