summaryrefslogtreecommitdiffstats
path: root/lib/network/connection
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-10-02 17:57:26 +0000
committerOlivier Blin <oblin@mandriva.com>2008-10-02 17:57:26 +0000
commite17232a8e71b8eb63c7134b9172c832bde5cf797 (patch)
treea098c52e503ece3f413d1aa3b2a5971fa06050de /lib/network/connection
parentd1acb2b6dee32b5d8fcf8c7302dba455ca2ca50f (diff)
downloaddrakx-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/network/connection')
-rw-r--r--lib/network/connection/wireless.pm9
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) };