From 57747ccdb1805b7cd694342d73636d242cfc1db8 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Wed, 29 Oct 2014 10:45:23 +0100 Subject: [PATCH] Hosts/services should not have themselves as parents fixes #7483 --- lib/icinga/checkable-dependency.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/icinga/checkable-dependency.cpp b/lib/icinga/checkable-dependency.cpp index 213031eb9..b66ddc70d 100644 --- a/lib/icinga/checkable-dependency.cpp +++ b/lib/icinga/checkable-dependency.cpp @@ -109,7 +109,7 @@ std::set Checkable::GetParents(void) const BOOST_FOREACH(const Dependency::Ptr& dep, GetDependencies()) { Checkable::Ptr parent = dep->GetParent(); - if (parent) + if (parent && parent.get() != this) parents.insert(parent); } @@ -123,7 +123,7 @@ std::set Checkable::GetChildren(void) const BOOST_FOREACH(const Dependency::Ptr& dep, GetReverseDependencies()) { Checkable::Ptr service = dep->GetChild(); - if (service) + if (service && service.get() != this) parents.insert(service); }