summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <blino@mageia.org>2012-03-20 22:23:02 +0000
committerOlivier Blin <blino@mageia.org>2012-03-20 22:23:02 +0000
commit8d4ae88f3bdebf3323de86667a495d5c8a5d4f7c (patch)
tree405b3179b441c49df988c4222d0cf5a6eb24a1e7
parentb27b0af484548f6c1149d3783a82b4e830fc90bf (diff)
downloaddrakx-net-8d4ae88f3bdebf3323de86667a495d5c8a5d4f7c.tar
drakx-net-8d4ae88f3bdebf3323de86667a495d5c8a5d4f7c.tar.gz
drakx-net-8d4ae88f3bdebf3323de86667a495d5c8a5d4f7c.tar.bz2
drakx-net-8d4ae88f3bdebf3323de86667a495d5c8a5d4f7c.tar.xz
drakx-net-8d4ae88f3bdebf3323de86667a495d5c8a5d4f7c.zip
make sure net object is passed to get_provider_settings and set_provider methods
-rw-r--r--lib/network/connection.pm7
-rw-r--r--lib/network/connection_manager.pm2
-rw-r--r--lib/network/netconnect.pm2
3 files changed, 5 insertions, 6 deletions
diff --git a/lib/network/connection.pm b/lib/network/connection.pm
index 4a1d9bd..c0c39a9 100644
--- a/lib/network/connection.pm
+++ b/lib/network/connection.pm
@@ -177,11 +177,10 @@ sub guess_provider_settings {
}
sub set_provider {
- my ($self) = @_;
+ my ($self, $net) = @_;
if ($self->{provider_name} ne N("Unlisted - edit manually")) {
my @providers_data = $self->get_providers;
$self->{provider} = $providers_data[0]{$self->{provider_name}};
- # FIXME: undeclared variable:
$self->apply_provider_settings($net);
}
}
@@ -194,13 +193,13 @@ sub apply_provider_settings {
#- check that $self->can('get_providers') first
sub get_provider_settings {
- my ($self) = @_;
+ my ($self, $net) = @_;
my @providers_data = $self->get_providers;
[
{
type => "list", val => \$self->{provider_name}, separator => $providers_data[1],
list => [ N("Unlisted - edit manually"), sort(keys %{$providers_data[0]}) ], sort => 0,
- changed => sub { $self->set_provider },
+ changed => sub { $self->set_provider($net) },
},
];
}
diff --git a/lib/network/connection_manager.pm b/lib/network/connection_manager.pm
index 3bbac97..535e278 100644
--- a/lib/network/connection_manager.pm
+++ b/lib/network/connection_manager.pm
@@ -105,7 +105,7 @@ sub load_settings {
$cmanager->{connection}->guess_network_access_settings if $cmanager->{connection}->can('guess_network_access_settings');
if ($cmanager->{connection}->can('get_providers')) {
$cmanager->{connection}->guess_provider_settings;
- $cmanager->{connection}->set_provider;
+ $cmanager->{connection}->set_provider($cmanager->{net});
}
$cmanager->{connection}->guess_protocol($cmanager->{net}) if $cmanager->{connection}->can('guess_protocol');
$cmanager->{connection}->guess_access_settings if $cmanager->{connection}->can('guess_access_settings');
diff --git a/lib/network/netconnect.pm b/lib/network/netconnect.pm
index adb048a..55dbec8 100644
--- a/lib/network/netconnect.pm
+++ b/lib/network/netconnect.pm
@@ -195,7 +195,7 @@ sub real_main {
select_provider => {
pre => sub {
- $provider_settings = $connection->get_provider_settings;
+ $provider_settings = $connection->get_provider_settings($net);
$connection->guess_provider_settings;
},
name => sub { $net->{type}->get_type_name . "\n\n" . N("Please select your provider:") },