summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-11-17 20:28:51 +0000
committerOlivier Blin <oblin@mandriva.com>2008-11-17 20:28:51 +0000
commit34c31d0aaf3385c068745b6a438eefd7209115c9 (patch)
tree0cf7261ef9d15cf04d338195758951bc968bd9d7
parentb4da1e191c45c83b1ba22a9b9266acb531faacf1 (diff)
downloaddrakx-net-34c31d0aaf3385c068745b6a438eefd7209115c9.tar
drakx-net-34c31d0aaf3385c068745b6a438eefd7209115c9.tar.gz
drakx-net-34c31d0aaf3385c068745b6a438eefd7209115c9.tar.bz2
drakx-net-34c31d0aaf3385c068745b6a438eefd7209115c9.tar.xz
drakx-net-34c31d0aaf3385c068745b6a438eefd7209115c9.zip
- wireless backend (backport from 0.53):
o run wpa_cli reconfigure after writing network settings in wpa config file o reload networks list from wpa_supplicant before checking if a network is configured (fixes showing configure window again when clicking Connect right after Configure)
-rw-r--r--lib/network/connection/wireless.pm10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/network/connection/wireless.pm b/lib/network/connection/wireless.pm
index 76fb00f..cefb80d 100644
--- a/lib/network/connection/wireless.pm
+++ b/lib/network/connection/wireless.pm
@@ -327,6 +327,12 @@ sub refresh_roaming_ids {
get_networks($self) if $self->{control}{roaming};
}
+sub selected_network_is_configured {
+ my ($self) = @_;
+ $self->refresh_roaming_ids;
+ $self->SUPER::selected_network_is_configured;
+}
+
sub guess_network {
my ($_self) = @_;
#- FIXME: try to find the AP matching $self->{ifcfg}{WIRELESS_ESSID};
@@ -622,6 +628,8 @@ sub add_nework_to_wpa_supplicant {
} else {
wpa_supplicant_add_network($self->{access}{network}{essid}, $self->{access}{network}{bssid}, $self->{access}{network}{encryption}, $self->{access}{network}{key}, $self->{access}{network}{force_ascii_key}, $self->{access}{network}{mode});
}
+ #- this should be handled by the monitoring daemon instead
+ run_program::run('/usr/sbin/wpa_cli', 'reconfigure');
}
sub write_settings {
@@ -665,7 +673,7 @@ sub connect {
if ($self->{control}{roaming}) {
my $network_id;
foreach (0 .. 1) {
- refresh_roaming_ids($self) if $_;
+ $self->refresh_roaming_ids if $_;
my $network = $self->get_selected_network;
$network_id = $network->{id} if $network && defined $network->{id};
}