+ fix error undefined

This commit is contained in:
garnier-quentin 2016-11-30 16:26:58 +01:00
parent a0a2b09abf
commit 626f682b57
1 changed files with 3 additions and 3 deletions

View File

@ -202,7 +202,9 @@ sub manage_selection {
($self->{ap}, $self->{ctrl}) = ({}, {});
foreach my $ap_name (keys %{$access_points}) {
foreach my $ap_name (keys %{$access_points}) {
$access_points->{$ap_name}->{controllerName} = 'NotRegistered'
if (!defined($access_points->{$ap_name}->{controllerName}));
if (defined($self->{option_results}->{filter_ap}) && $self->{option_results}->{filter_ap} ne '' &&
$ap_name !~ /$self->{option_results}->{filter_ap}/) {
$self->{output}->output_add(long_msg => "skipping '" . $ap_name . "': no matching filter.", debug => 1);
@ -214,8 +216,6 @@ sub manage_selection {
next;
}
$access_points->{$ap_name}->{controllerName} = 'NotRegistered'
if (!defined($access_points->{$ap_name}->{controllerName}));
$self->{ap}->{$ap_name} = {
name => $ap_name, controller => $access_points->{$ap_name}->{controllerName},
status => $access_points->{$ap_name}->{status},