Clean up reachability calculation.

This commit is contained in:
Gunnar Beutner 2012-07-09 17:03:24 +02:00
parent 16e8d131fb
commit 9e7ba72eb4
1 changed files with 11 additions and 4 deletions

View File

@ -144,8 +144,15 @@ bool Service::IsReachable(void) const
if (!service.HasLastCheckResult())
continue;
if (service.GetStateType() == StateTypeHard && service.GetState() != StateOK &&
service.GetState() != StateWarning)
/* ignore soft states */
if (service.GetStateType() == StateTypeSoft)
continue;
/* ignore services states OK and Warning */
if (service.GetState() == StateOK ||
service.GetState() == StateWarning)
continue;
return false;
}