Make change to OK always a hard state

refs #11654
This commit is contained in:
Markus Frosch 2016-05-31 17:03:49 +02:00 committed by Gunnar Beutner
parent 9e29a3f8a0
commit 8808e709c9
1 changed files with 2 additions and 5 deletions

View File

@ -180,13 +180,10 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig
if (!old_cr) {
SetStateType(StateTypeHard);
} else if (IsStateOK(cr->GetState())) {
if (IsStateOK(old_state) && old_stateType == StateTypeSoft) {
SetStateType(StateTypeHard); // SOFT OK -> HARD OK
recovery = true;
}
SetStateType(StateTypeHard); // NOT-OK -> HARD OK
if (!IsStateOK(old_state))
recovery = true; // NOT OK -> SOFT/HARD OK
recovery = true;
ResetNotificationNumbers();
SaveLastState(ServiceOK, Utility::GetTime());