Skip to content

Commit

Permalink
Merge pull request #777 from omercier/typo-finded-variables
Browse files Browse the repository at this point in the history
+Fix typo variables and functions containing finded
  • Loading branch information
qgarnier authored Oct 12, 2017
2 parents 44fd5ee + bc00a01 commit 7e3fb93
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions apps/centreon/local/mode/retentionbroker.pm
Original file line number Diff line number Diff line change
Expand Up @@ -98,20 +98,20 @@ sub run {
short_msg => "'$config': cannot parse xml");
next;
}
my %failover_finded = ();
my %file_finded = ();
my %failover_found = ();
my %file_found = ();
my $temporary;
foreach my $node ($xml->findnodes('/centreonBroker/output')) {
my %load = ();
foreach my $element ($node->getChildrenByTagName('*')) {
if ($element->nodeName eq 'failover') {
$failover_finded{$element->textContent} = 1;
$failover_found{$element->textContent} = 1;
} elsif ($element->nodeName =~ /^(name|type|path)$/) {
$load{$element->nodeName} = $element->textContent;
}
}
if (defined($load{type}) && $load{type} eq 'file') {
$file_finded{$load{name}} = {%load};
$file_found{$load{name}} = {%load};
}
}

Expand All @@ -123,10 +123,10 @@ sub run {

# Check failovers
my $current_total = 0;
foreach my $failover (sort keys %failover_finded) {
next if (!defined($file_finded{$failover}));
foreach my $failover (sort keys %failover_found) {
next if (!defined($file_found{$failover}));

my ($status, $total, $size) = $self->check_directory(config => $config, path => $file_finded{$failover}->{path});
my ($status, $total, $size) = $self->check_directory(config => $config, path => $file_found{$failover}->{path});
next if (!$status);

$current_total += $total;
Expand Down

1 comment on commit 7e3fb93

@cgagnaire
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:)

Please sign in to comment.