diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-02-29 01:28:31 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-02-29 01:28:31 +0000 |
commit | 64a2e0f06f4f19c1f518c245908dfe81806944f7 (patch) | |
tree | b573757b145e4877f7ed73f039f5e1498a9f7424 /lib/network/connection/wireless.pm | |
parent | 0146639c6ec333e9bfc84a5dbc4da1d9d9ee701e (diff) | |
download | drakx-net-64a2e0f06f4f19c1f518c245908dfe81806944f7.tar drakx-net-64a2e0f06f4f19c1f518c245908dfe81806944f7.tar.gz drakx-net-64a2e0f06f4f19c1f518c245908dfe81806944f7.tar.bz2 drakx-net-64a2e0f06f4f19c1f518c245908dfe81806944f7.tar.xz drakx-net-64a2e0f06f4f19c1f518c245908dfe81806944f7.zip |
style/indentation
Diffstat (limited to 'lib/network/connection/wireless.pm')
-rw-r--r-- | lib/network/connection/wireless.pm | 58 |
1 files changed, 26 insertions, 32 deletions
diff --git a/lib/network/connection/wireless.pm b/lib/network/connection/wireless.pm index 6ba6000..fe21e74 100644 --- a/lib/network/connection/wireless.pm +++ b/lib/network/connection/wireless.pm @@ -874,42 +874,36 @@ sub wpa_supplicant_write_conf { } sub wpa_supplicant_load_eap_settings { - my ($network, $conf, $old_net, $myone, $ui_var, $quoted_essid); - $network = shift; - $quoted_essid = qq("$network->{essid}"); - $conf = wpa_supplicant_read_conf(); + my ($network) = @_; + my $quoted_essid = qq("$network->{essid}"); + my $conf = wpa_supplicant_read_conf(); foreach my $old_net (@$conf) { - if ($old_net->{ssid} eq $network->{essid} || $old_net->{ssid} eq $quoted_essid) { - $network->{eapextra} = ''; - foreach my $myone (keys %eap_vars) { - next if $myone eq 'ssid'; - $ui_var = join('_', "eap", $myone); - if (defined $old_net->{$myone}) { - if ($eap_vars{$myone} == 0) { - #load into the eapextra variable - if ($network->{eapextra} eq "") { - $network->{eapextra} = "$myone=$old_net->{$myone}"; - } else { - $network->{eapextra} = join('#', $network->{eapextra}, "$myone=$old_net->{$myone}"); - } - } else { - #case > 1 or 2 - $network->{$ui_var} = $old_net->{$myone}; - #Remove quotes on selected variables - $network->{$ui_var} = $1 if $eap_vars{$myone} == 2 && $network->{$ui_var} =~ /^"(.*)"$/; - if ($myone eq "proto") { - $network->{forceeap} = 'WPA2' if $old_net->{$myone} eq "RSN"; - $network->{forceeap} = 'WPA' if $old_net->{$myone} eq "WPA"; - } - } - } - - } - last; + $network->{eapextra} = ''; + foreach my $myone (keys %eap_vars) { + next if $myone eq 'ssid'; + my $ui_var = join('_', "eap", $myone); + if (defined $old_net->{$myone}) { + if ($eap_vars{$myone} == 0) { + if ($network->{eapextra} eq "") { + $network->{eapextra} = "$myone=$old_net->{$myone}"; + } else { + $network->{eapextra} = join('#', $network->{eapextra}, "$myone=$old_net->{$myone}"); + } + } else { + $network->{$ui_var} = $old_net->{$myone}; + #- remove quotes on selected variables + $network->{$ui_var} = $1 if $eap_vars{$myone} == 2 && $network->{$ui_var} =~ /^"(.*)"$/; + if ($myone eq "proto") { + $network->{forceeap} = 'WPA2' if $old_net->{$myone} eq "RSN"; + $network->{forceeap} = 'WPA' if $old_net->{$myone} eq "WPA"; + } + } + } + } + last; } } - } sub wpa_supplicant_add_eap_network { |