[icinga-checkins] icinga.org: icinga2/master: Fixed notifications for hard recoveries.

git at icinga.org git at icinga.org
Wed Feb 27 06:52:16 CET 2013


Module: icinga2
Branch: master
Commit: 3a74316aab2ff194fcb11abe842dbb3ce9ad23f0
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=3a74316aab2ff194fcb11abe842dbb3ce9ad23f0

Author: Gunnar Beutner <gunnar.beutner at netways.de>
Date:   Wed Feb 27 06:50:39 2013 +0100

Fixed notifications for hard recoveries.

---

 lib/icinga/service-check.cpp |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/icinga/service-check.cpp b/lib/icinga/service-check.cpp
index f1874d1..5bc4e2b 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;





More information about the icinga-checkins mailing list