From ccca4470eac49d99ca94019b738684acc26fdc37 Mon Sep 17 00:00:00 2001 From: Quentin Garnier Date: Fri, 28 Sep 2012 13:44:03 +0000 Subject: [PATCH] Bug fix git-svn-id: http://svn.merethis.net/centreon-esxd/trunk@34 a5eaa968-4c79-4d68-970d-af6011b5b055 --- connectors/vmware/lib/command-statushost.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/connectors/vmware/lib/command-statushost.pm b/connectors/vmware/lib/command-statushost.pm index eac151302..b1895175c 100644 --- a/connectors/vmware/lib/command-statushost.pm +++ b/connectors/vmware/lib/command-statushost.pm @@ -38,12 +38,12 @@ sub statushost_do { ); foreach my $entity_view (@$result) { - my $status = $entity_view->{'summary.overallStatus'}->val; + my $status_esx = $entity_view->{'summary.overallStatus'}->val; - if (defined($status) && $overallStatus{$status}) { - $output = "The Server '$lhost' " . $overallStatus{$status}; - if ($MYERRORS_MASK{$overallStatusReturn{$status}} != 0) { - $status |= $MYERRORS_MASK{$overallStatusReturn{$status}}; + if (defined($status) && $overallStatus{$status_esx}) { + $output = "The Server '$lhost' " . $overallStatus{$status_esx}; + if ($MYERRORS_MASK{$overallStatusReturn{$status_esx}} != 0) { + $status |= $MYERRORS_MASK{$overallStatusReturn{$status_esx}}; } } else { $output = "Can't interpret data...";