From 8d8d1d8cd88a3e9991b69a4188d7035bb94ef797 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Fri, 25 Jan 2013 16:21:21 +0100 Subject: [PATCH] Reschedule service dependencies on soft state changes. Fixes #3574 --- lib/icinga/service.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/icinga/service.cpp b/lib/icinga/service.cpp index 3d6d18568..17149f757 100644 --- a/lib/icinga/service.cpp +++ b/lib/icinga/service.cpp @@ -515,6 +515,16 @@ void Service::ApplyCheckResult(const Dictionary::Ptr& cr) SetAcknowledgement(AcknowledgementNone); SetAcknowledgementExpiry(0); } + + /* reschedule dependencies */ + String svc; + BOOST_FOREACH(tie(tuples::ignore, svc), GetDependencies()) { + if (!Service::Exists(svc)) + continue; + + Service::Ptr service = Service::GetByName(svc); + service->SetNextCheck(Utility::GetTime()); + } } }