diff options
-rw-r--r-- | lib/network/connection.pm | 7 | ||||
-rw-r--r-- | lib/network/connection_manager.pm | 2 | ||||
-rw-r--r-- | lib/network/netconnect.pm | 2 |
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:") }, |