From a649a91cdc0ba24b7e56d5a4580ce85c26adca8c Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Sat, 9 Feb 2013 15:22:46 +0100 Subject: [PATCH] Bugfix for triggered downtimes. --- lib/icinga/service.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/icinga/service.cpp b/lib/icinga/service.cpp index a97a18442..1a65de6f2 100644 --- a/lib/icinga/service.cpp +++ b/lib/icinga/service.cpp @@ -553,11 +553,11 @@ void Service::ApplyCheckResult(const Dictionary::Ptr& cr) if (service) service->SetNextCheck(Utility::GetTime()); } - - if (GetState() != StateOK) - TriggerDowntimes(); } + if (GetState() != StateOK) + TriggerDowntimes(); + if (GetStateType() == StateTypeHard && (old_state != GetState() || old_stateType == StateTypeSoft)) { SetLastHardStateChange(now); -- 2.40.0