ServiceState old_state = GetStateRaw();
StateType old_stateType = GetStateType();
long old_attempt = GetCheckAttempt();
- bool recovery;
+ bool recovery = false;
if (old_cr && cr->GetExecutionStart() < old_cr->GetExecutionStart())
return;
long attempt = 1;
if (!old_cr) {
- recovery = false;
SetStateType(StateTypeHard);
} else if (cr->GetState() == ServiceOK) {
if (old_state == ServiceOK && old_stateType == StateTypeSoft) {
recovery = true;
}
+ if (old_state != ServiceOK)
+ recovery = true; // NOT OK -> SOFT/HARD OK
+
ResetNotificationNumbers();
SetLastStateOK(Utility::GetTime());
} else {
attempt = old_attempt;
}
- recovery = false;
-
switch (cr->GetState()) {
case ServiceOK:
/* Nothing to do here. */