[icinga-checkins] icinga.org: icinga2/master: Don' t update TimePeriod ranges for inactive objects

git at icinga.org git at icinga.org
Tue Aug 23 07:00:04 CEST 2016


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

Author: Gunnar Beutner <gunnar.beutner at netways.de>
Date:   Tue Aug 23 06:59:52 2016 +0200

Don't update TimePeriod ranges for inactive objects

fixes #12511

---

 lib/icinga/timeperiod.cpp |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/icinga/timeperiod.cpp b/lib/icinga/timeperiod.cpp
index 43b8f34..ccb9385 100644
--- a/lib/icinga/timeperiod.cpp
+++ b/lib/icinga/timeperiod.cpp
@@ -345,6 +345,9 @@ void TimePeriod::UpdateTimerHandler(void)
 	double now = Utility::GetTime();
 
 	BOOST_FOREACH(const TimePeriod::Ptr& tp, ConfigType::GetObjectsByType<TimePeriod>()) {
+		if (!tp->IsActive())
+			continue;
+
 		double valid_end;
 
 		{



More information about the icinga-checkins mailing list