From 02f8eab9d55599fa3ac93962eaeb2b2aef3832cf Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Tue, 9 Dec 2008 09:41:17 +0000 Subject: make connection managers use mandi when available --- lib/network/connection/wireless.pm | 4 ++-- lib/network/connection_manager.pm | 2 +- lib/network/netconnect.pm | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/network') diff --git a/lib/network/connection/wireless.pm b/lib/network/connection/wireless.pm index ff48fb8..03fa9cc 100644 --- a/lib/network/connection/wireless.pm +++ b/lib/network/connection/wireless.pm @@ -355,9 +355,9 @@ sub load_interface_settings { } sub get_networks { - my ($self) = @_; + my ($self, $o_net) = @_; require network::monitor; - ($self->{networks}, $self->{control}{roaming}) = network::monitor::list_wireless(undef, $self->get_interface); + ($self->{networks}, $self->{control}{roaming}) = network::monitor::list_wireless($o_net && $o_net->{monitor}, $self->get_interface); $self->probed_networks; $self->{networks}; } diff --git a/lib/network/connection_manager.pm b/lib/network/connection_manager.pm index 0ac2cda..a3cfe41 100644 --- a/lib/network/connection_manager.pm +++ b/lib/network/connection_manager.pm @@ -333,7 +333,7 @@ sub update_networks { $cmanager->check_setup || $cmanager->setup_connection or return; my $wait = $cmanager->{connection}->network_scan_is_slow && $cmanager->{in}->wait_message(N("Please wait"), N("Scanning for networks...")); - $cmanager->{connection}{networks} = $cmanager->{connection}->get_networks; + $cmanager->{connection}{networks} = $cmanager->{connection}->get_networks($cmanager->{net}); $cmanager->{connection}{network} ||= find { $cmanager->{connection}{networks}{$_}{current} } keys %{$cmanager->{connection}{networks}}; my $routes = network::tools::get_routes(); diff --git a/lib/network/netconnect.pm b/lib/network/netconnect.pm index 4ccd732..2759554 100644 --- a/lib/network/netconnect.pm +++ b/lib/network/netconnect.pm @@ -205,7 +205,7 @@ sub real_main { select_network => { pre => sub { my $_w = $in->wait_message(N("Please wait"), N("Scanning for networks...")); - $connection->get_networks; + $connection->get_networks($net); }, name => sub { $net->{type}->get_type_name . "\n\n" . N("Please select your network:") }, data => sub { -- cgit v1.2.1