From: Gunnar Beutner Date: Wed, 27 Feb 2013 05:50:39 +0000 (+0100) Subject: Fixed notifications for hard recoveries. X-Git-Tag: v0.0.2~359 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3a74316aab2ff194fcb11abe842dbb3ce9ad23f0;p=icinga2 Fixed notifications for hard recoveries. --- diff --git a/lib/icinga/service-check.cpp b/lib/icinga/service-check.cpp index f1874d183..5bc4e2bc5 100644 --- a/lib/icinga/service-check.cpp +++ b/lib/icinga/service-check.cpp @@ -254,11 +254,10 @@ void Service::ApplyCheckResult(const Dictionary::Ptr& cr) long attempt = GetCurrentCheckAttempt(); if (cr->Get("state") == StateOK) { - if (old_state != StateOK && old_stateType == StateTypeHard) + if (old_state == StateOK && old_stateType == StateTypeSoft) { hardChange = true; // hard recovery - - if (old_state == StateOK) SetStateType(StateTypeHard); + } attempt = 1; recovery = true;