From 16cae9df7ce8f494c14ba64f2fa30c57e90f09e8 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Mon, 19 May 2008 12:57:27 +0000 Subject: do not incorrectly provide get_networks in network::connection --- lib/network/connection.pm | 3 +-- lib/network/connection/cellular_card.pm | 2 +- lib/network/connection/wireless.pm | 3 ++- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/network') diff --git a/lib/network/connection.pm b/lib/network/connection.pm index e2ab8fe..5467d6f 100644 --- a/lib/network/connection.pm +++ b/lib/network/connection.pm @@ -257,10 +257,9 @@ sub write_settings { network::network::reload_net_applet(); } -sub get_networks { +sub probed_networks { my ($self) = @_; $self->{probed_networks} = 1; - $self->{networks}; } sub connect { diff --git a/lib/network/connection/cellular_card.pm b/lib/network/connection/cellular_card.pm index bf14ccb..432a048 100644 --- a/lib/network/connection/cellular_card.pm +++ b/lib/network/connection/cellular_card.pm @@ -76,6 +76,7 @@ sub get_networks { my $cmd = 'comgt -d ' . $self->get_control_device; my ($network, $state) = `$cmd reg` =~ /^Registered on \w+ network: "(.*)",(\d+)$/m; my ($strength) = `$cmd sig` =~ /^Signal Quality:\s+(\d+),\d+$/; + $self->probed_networks; $self->{networks} = $network && { $network => { name => $network, @@ -83,7 +84,6 @@ 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 b290ac6..0a4f891 100644 --- a/lib/network/connection/wireless.pm +++ b/lib/network/connection/wireless.pm @@ -314,7 +314,8 @@ sub get_networks { my ($self) = @_; require network::monitor; ($self->{networks}, $self->{control}{roaming}) = network::monitor::list_wireless(undef, $self->get_interface); - $self->SUPER::get_networks; + $self->probed_networks; + $self->{networks}; } sub refresh_roaming_ids { -- cgit v1.2.1