From ff7359131f3c1408993e1d907b4d2ce476425ebd Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Fri, 29 Feb 2008 01:46:34 +0000 Subject: simplify --- lib/network/connection/wireless.pm | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/network/connection/wireless.pm b/lib/network/connection/wireless.pm index 26b9622..eec89ea 100644 --- a/lib/network/connection/wireless.pm +++ b/lib/network/connection/wireless.pm @@ -931,11 +931,7 @@ sub wpa_supplicant_add_eap_network { #- set the values foreach my $eap_var (keys %eap_vars) { my $key = join('_', "eap", $eap_var); - if (!defined $ui_input->{$key}) { - #- only if it is defined and not empty - $network->{$eap_var} = $default_eap_cfg->{$eap_var} if $default_eap_cfg->{$eap_var}; - } elsif ($ui_input->{$key} =~ /auto detect/i) { - #- only if it is defined and not empty + if (!defined $ui_input->{$key} || $ui_input->{$key} =~ /auto detect/i) { $network->{$eap_var} = $default_eap_cfg->{$eap_var} if $default_eap_cfg->{$eap_var}; } else { #- do not define if blank, the save routine will delete entry from file -- cgit v1.2.1