From ea08c8542463a4212340df17bba5c89e153aafc3 Mon Sep 17 00:00:00 2001 From: Noah Hilverling Date: Tue, 19 Jun 2018 10:30:34 +0200 Subject: [PATCH] Fix that TimePeriod segments are not cleared on restart refs #6282 --- lib/icinga/timeperiod.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/icinga/timeperiod.cpp b/lib/icinga/timeperiod.cpp index 97183223e..28f418a32 100644 --- a/lib/icinga/timeperiod.cpp +++ b/lib/icinga/timeperiod.cpp @@ -235,7 +235,9 @@ void TimePeriod::Merge(const TimePeriod::Ptr& timeperiod, bool include) void TimePeriod::UpdateRegion(double begin, double end, bool clearExisting) { - if (!clearExisting) { + if (clearExisting) { + SetSegments(new Array()); + } else { if (begin < GetValidEnd()) begin = GetValidEnd();