diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-10-02 17:57:26 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-10-02 17:57:26 +0000 |
commit | e17232a8e71b8eb63c7134b9172c832bde5cf797 (patch) | |
tree | a098c52e503ece3f413d1aa3b2a5971fa06050de /lib | |
parent | d1acb2b6dee32b5d8fcf8c7302dba455ca2ca50f (diff) | |
download | drakx-net-e17232a8e71b8eb63c7134b9172c832bde5cf797.tar drakx-net-e17232a8e71b8eb63c7134b9172c832bde5cf797.tar.gz drakx-net-e17232a8e71b8eb63c7134b9172c832bde5cf797.tar.bz2 drakx-net-e17232a8e71b8eb63c7134b9172c832bde5cf797.tar.xz drakx-net-e17232a8e71b8eb63c7134b9172c832bde5cf797.zip |
keep old network id if wpa_supplicant has not been able to scan the network
Diffstat (limited to 'lib')
-rw-r--r-- | lib/network/connection/wireless.pm | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/network/connection/wireless.pm b/lib/network/connection/wireless.pm index 20ebd8d..d6d5872 100644 --- a/lib/network/connection/wireless.pm +++ b/lib/network/connection/wireless.pm @@ -702,9 +702,12 @@ sub connect { $self->SUPER::connect; if ($self->{control}{roaming}) { - refresh_roaming_ids($self); - my $network = $self->get_selected_network; - my $network_id = $network->{id} if $network && defined $network->{id}; + my $network_id; + foreach (0 .. 1) { + refresh_roaming_ids($self) if $_; + my $network = $self->get_selected_network; + $network_id = $network->{id} if $network && defined $network->{id}; + } if (defined $network_id) { if ($net->{monitor}) { eval { $net->{monitor}->select_network($network_id) }; |