]> granicus.if.org Git - icinga2/commitdiff
Downtime#HasValidConfigOwner(): wait for ScheduledDowntimes
authorAlexander A. Klimov <alexander.klimov@icinga.com>
Thu, 6 Dec 2018 11:50:48 +0000 (12:50 +0100)
committerMichael Friedrich <michael.friedrich@icinga.com>
Mon, 11 Feb 2019 12:13:44 +0000 (13:13 +0100)
refs #6542

(cherry picked from commit 39e0d787e82c187de64b29e4979f4caac0907441)

lib/icinga/downtime.cpp

index 336329bc2a0e0584e5e3e048498359f186702098..4180747ac94c9a1fb6f2cf6282e7967b2abce84f 100644 (file)
@@ -210,6 +210,10 @@ bool Downtime::IsExpired() const
 
 bool Downtime::HasValidConfigOwner() const
 {
+       if (!ScheduledDowntime::AllConfigIsLoaded()) {
+               return true;
+       }
+
        String configOwner = GetConfigOwner();
        return configOwner.IsEmpty() || GetObject<ScheduledDowntime>(configOwner);
 }