Don't run event commands when hosts/services are OK

fixes #6686
This commit is contained in:
Gunnar Beutner 2014-07-16 11:48:36 +02:00
parent a098fe804b
commit ec92309349
1 changed files with 4 additions and 2 deletions

View File

@ -264,12 +264,14 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig
long attempt = 1;
if (!old_cr) {
recovery = false;
SetStateType(StateTypeHard);
} else if (cr->GetState() == ServiceOK) {
if (old_state == ServiceOK && old_stateType == StateTypeSoft)
if (old_state == ServiceOK && old_stateType == StateTypeSoft) {
SetStateType(StateTypeHard); // SOFT OK -> HARD OK
recovery = true;
}
recovery = true;
ResetNotificationNumbers();
SetLastStateOK(Utility::GetTime());
} else {