diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-05-05 20:25:59 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-05-05 20:25:59 +0000 |
commit | 18211b26711d90fa61457080ec89cc2bfca30958 (patch) | |
tree | ca17eb68871fce1bc9bfd7dbe5f29f947d1c8aef | |
parent | 6d493ca6b1af1097c2f16969ca8dfb5579bb91b1 (diff) | |
download | drakx-net-18211b26711d90fa61457080ec89cc2bfca30958.tar drakx-net-18211b26711d90fa61457080ec89cc2bfca30958.tar.gz drakx-net-18211b26711d90fa61457080ec89cc2bfca30958.tar.bz2 drakx-net-18211b26711d90fa61457080ec89cc2bfca30958.tar.xz drakx-net-18211b26711d90fa61457080ec89cc2bfca30958.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 62c4bb2..3e72f80 100644 --- a/lib/network/connection/wireless.pm +++ b/lib/network/connection/wireless.pm @@ -317,6 +317,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}; @@ -656,6 +665,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}) }; |