summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-05-18 19:12:07 +0000
committerOlivier Blin <oblin@mandriva.com>2008-05-18 19:12:07 +0000
commit98b351b053aaec48a022114b594fdac1caaaf481 (patch)
treebb5801286f234be3916bd9a8f5deb88d35a6d0a6
parent477d72b82b096976fb473326d700a33ffb12703d (diff)
downloaddrakx-net-98b351b053aaec48a022114b594fdac1caaaf481.tar
drakx-net-98b351b053aaec48a022114b594fdac1caaaf481.tar.gz
drakx-net-98b351b053aaec48a022114b594fdac1caaaf481.tar.bz2
drakx-net-98b351b053aaec48a022114b594fdac1caaaf481.tar.xz
drakx-net-98b351b053aaec48a022114b594fdac1caaaf481.zip
add network::connection::get_networks (so that we can know if a networks probe has already been performed)
-rw-r--r--lib/network/connection.pm6
-rw-r--r--lib/network/connection/cellular_card.pm1
-rw-r--r--lib/network/connection/wireless.pm2
3 files changed, 8 insertions, 1 deletions
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 {