Fixed recovery notifications (again).

This commit is contained in:
Gunnar Beutner 2013-02-27 16:57:06 +01:00
parent e98fd3e3eb
commit a960237139
1 changed files with 5 additions and 2 deletions

View File

@ -254,11 +254,14 @@ void Service::ApplyCheckResult(const Dictionary::Ptr& cr)
long attempt = GetCurrentCheckAttempt();
if (cr->Get("state") == StateOK) {
if (old_state != StateOK && old_stateType == StateTypeHard)
SetStateType(StateTypeSoft); // HARD NON-OK -> SOFT OK
if (old_state == StateOK && old_stateType == StateTypeSoft)
hardChange = true; // hard recovery
hardChange = true; // SOFT OK -> HARD OK
if (old_state == StateOK || old_stateType == StateTypeSoft)
SetStateType(StateTypeHard);
SetStateType(StateTypeHard); // SOFT OK -> HARD OK or SOFT NON-OK -> HARD OK
attempt = 1;
recovery = true;