]> granicus.if.org Git - icinga2/commitdiff
Fixed notifications for hard recoveries.
authorGunnar Beutner <gunnar.beutner@netways.de>
Wed, 27 Feb 2013 05:50:39 +0000 (06:50 +0100)
committerGunnar Beutner <gunnar.beutner@netways.de>
Wed, 27 Feb 2013 05:52:13 +0000 (06:52 +0100)
lib/icinga/service-check.cpp

index f1874d183c9a85ab8be2152920ed5c53f0f3c94c..5bc4e2bc551f7eff31e9cf1fb01da2bb3048cd88 100644 (file)
@@ -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;