diff options
-rw-r--r-- | lib/network/connection/wireless.pm | 10 |
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}; } |