[icinga-checkins] icinga.org: icinga2/master: Fix incorrect calculation in Downtime:: IsInEffect

git at icinga.org git at icinga.org
Wed May 11 14:13:45 CEST 2016


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

Author: Gunnar Beutner <gunnar.beutner at netways.de>
Date:   Wed May 11 14:13:05 2016 +0200

Fix incorrect calculation in Downtime::IsInEffect

fixes #11589

---

 lib/icinga/downtime.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/icinga/downtime.cpp b/lib/icinga/downtime.cpp
index 62bdb7c..eaa2e9b 100644
--- a/lib/icinga/downtime.cpp
+++ b/lib/icinga/downtime.cpp
@@ -166,7 +166,7 @@ bool Downtime::IsInEffect(void) const
 	if (triggerTime == 0)
 		return false;
 
-	return (triggerTime + GetDuration() < now);
+	return (now < triggerTime + GetDuration());
 }
 
 bool Downtime::IsTriggered(void) const



More information about the icinga-checkins mailing list