]> granicus.if.org Git - icinga2/commitdiff
Fix that recovery notifications are sent in SOFT NOT-OK states
authorMichael Friedrich <michael.friedrich@netways.de>
Tue, 23 Aug 2016 12:35:59 +0000 (14:35 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Tue, 23 Aug 2016 12:58:24 +0000 (14:58 +0200)
fixes #12517

lib/icinga/checkable-check.cpp

index 9080d67397f00f8357fa924f80466fe41b1d3ba2..a064a80ae4490a6fd2d6ea8cd494d32bcf7ab711 100644 (file)
@@ -183,7 +183,7 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig
        if (IsStateOK(cr->GetState())) {
                SetStateType(StateTypeHard); // NOT-OK -> HARD OK
 
-               if (!IsStateOK(old_state))
+               if (old_stateType == StateTypeHard && !IsStateOK(old_state))
                        recovery = true;
 
                ResetNotificationNumbers();