diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-03-14 17:47:04 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-03-14 17:47:04 +0000 |
commit | 16d29a97063bbd928874697180ecbc27e2525199 (patch) | |
tree | 00ad93991a07763dda226cfb04ac37dbb5424f01 /lib/network/drakroam.pm | |
parent | 5fa9d6db48beec58c1e0ae296ddb0e4918d69fd7 (diff) | |
download | drakx-net-16d29a97063bbd928874697180ecbc27e2525199.tar drakx-net-16d29a97063bbd928874697180ecbc27e2525199.tar.gz drakx-net-16d29a97063bbd928874697180ecbc27e2525199.tar.bz2 drakx-net-16d29a97063bbd928874697180ecbc27e2525199.tar.xz drakx-net-16d29a97063bbd928874697180ecbc27e2525199.zip |
add set_connection wrapper
Diffstat (limited to 'lib/network/drakroam.pm')
-rwxr-xr-x | lib/network/drakroam.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/network/drakroam.pm b/lib/network/drakroam.pm index e308cf3..7d499c5 100755 --- a/lib/network/drakroam.pm +++ b/lib/network/drakroam.pm @@ -40,7 +40,7 @@ sub get_connection { sub select_connection { my ($droam) = @_; - $droam->{connection} = get_connection($droam); + network::connection_manager::set_connection($droam, get_connection($droam)); network::connection_manager::check_setup($droam) || network::connection_manager::setup_connection($droam) if $droam->{connection}; update_on_connection_change($droam); @@ -142,8 +142,9 @@ sub main { my @connection_types = qw(network::connection::wireless network::connection::cellular_card); @{$droam->{all_connections}} = map { $_->get_connections(automatic_only => 1) } @connection_types; - $droam->{connection} = $o_interface && find { $_->get_interface eq $o_interface } @{$droam->{all_connections}}; - $droam->{connection} ||= find { !$_->network_scan_is_slow } @{$droam->{all_connections}}; + my $connection = $o_interface && find { $_->get_interface eq $o_interface } @{$droam->{all_connections}}; + $connection ||= find { !$_->network_scan_is_slow } @{$droam->{all_connections}}; + network::connection_manager::set_connection($droam, $connection) if $connection; update_connections_list($droam); update_on_connection_change($droam); |