From 98b351b053aaec48a022114b594fdac1caaaf481 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Sun, 18 May 2008 19:12:07 +0000 Subject: add network::connection::get_networks (so that we can know if a networks probe has already been performed) --- lib/network/connection.pm | 6 ++++++ lib/network/connection/cellular_card.pm | 1 + lib/network/connection/wireless.pm | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/network/connection.pm b/lib/network/connection.pm index 6415282..f397f08 100644 --- a/lib/network/connection.pm +++ b/lib/network/connection.pm @@ -231,6 +231,12 @@ sub write_settings { network::network::reload_net_applet(); } +sub get_networks { + my ($self) = @_; + $self->{probed_networks} = 1; + $self->{networks}; +} + sub connect { my ($self) = @_; require network::tools; diff --git a/lib/network/connection/cellular_card.pm b/lib/network/connection/cellular_card.pm index c709649..3d90771 100644 --- a/lib/network/connection/cellular_card.pm +++ b/lib/network/connection/cellular_card.pm @@ -83,6 +83,7 @@ sub get_networks { current => $state == 2, } }; + $self->SUPER::get_networks; } sub get_hardware_settings { diff --git a/lib/network/connection/wireless.pm b/lib/network/connection/wireless.pm index 9bca85a..b290ac6 100644 --- a/lib/network/connection/wireless.pm +++ b/lib/network/connection/wireless.pm @@ -314,7 +314,7 @@ sub get_networks { my ($self) = @_; require network::monitor; ($self->{networks}, $self->{control}{roaming}) = network::monitor::list_wireless(undef, $self->get_interface); - $self->{networks}; + $self->SUPER::get_networks; } sub refresh_roaming_ids { -- cgit v1.2.1