diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-05-12 12:31:50 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-05-12 12:31:50 +0000 |
commit | 41d76cf7af90d67fe01b1095b70abe7ba2b7ee30 (patch) | |
tree | cbc8b272a3c8b861ac3561be9397aad2a45a1c1f | |
parent | 412ac22309ffcc97f701116df3810f8f727a6ec5 (diff) | |
download | drakx-net-41d76cf7af90d67fe01b1095b70abe7ba2b7ee30.tar drakx-net-41d76cf7af90d67fe01b1095b70abe7ba2b7ee30.tar.gz drakx-net-41d76cf7af90d67fe01b1095b70abe7ba2b7ee30.tar.bz2 drakx-net-41d76cf7af90d67fe01b1095b70abe7ba2b7ee30.tar.xz drakx-net-41d76cf7af90d67fe01b1095b70abe7ba2b7ee30.zip |
refresh networks list when switching from non-roaming to roaming (to get wpa_supplicant network IDs)
-rw-r--r-- | lib/network/connection/wireless.pm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/network/connection/wireless.pm b/lib/network/connection/wireless.pm index 52eb667..bdac4af 100644 --- a/lib/network/connection/wireless.pm +++ b/lib/network/connection/wireless.pm @@ -276,6 +276,15 @@ sub get_networks { $self->{networks}; } +sub refresh_roaming_ids { + my ($self) = @_; + #- needed when switching from non-roaming to roaming + #- to get wpa_supplicant network IDs + get_networks($self) if + $self->{control}{roaming} && + !any { defined $_->{id} } values %{$self->{networks}}; +} + sub guess_network { my ($_self) = @_; #- FIXME: try to find the AP matching $self->{ifcfg}{WIRELESS_ESSID}; @@ -488,6 +497,7 @@ sub connect { $self->SUPER::connect; if ($self->{control}{roaming}) { + refresh_roaming_ids($self); my $network = $self->get_selected_network; if ($network && defined $network->{id}) { eval { $net->{monitor}->select_network($network->{id}) }; |