From 26da51e0713bf2f70df626d377b6355ef255422d Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Fri, 12 Oct 2012 10:33:11 +0200 Subject: [PATCH] Bugfix: The delegation component should use only non-local checker endpoints. --- components/delegation/delegationcomponent.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/components/delegation/delegationcomponent.cpp b/components/delegation/delegationcomponent.cpp index 7acbccd82..a345ae038 100644 --- a/components/delegation/delegationcomponent.cpp +++ b/components/delegation/delegationcomponent.cpp @@ -44,8 +44,13 @@ vector DelegationComponent::GetCheckerCandidates(const Service::P BOOST_FOREACH(tie(tuples::ignore, object), DynamicObject::GetObjects("Endpoint")) { Endpoint::Ptr endpoint = dynamic_pointer_cast(object); + /* ignore local-only endpoints */ + if (endpoint->IsLocal()) + continue; + /* ignore disconnected endpoints */ - if (!endpoint->IsConnected()) + if (!endpoint->IsConnected() && + endpoint->GetName() != EndpointManager::GetInstance()->GetIdentity()) continue; /* ignore endpoints that aren't running the checker component */ @@ -70,6 +75,9 @@ void DelegationComponent::DelegationTimerHandler(void) BOOST_FOREACH(tie(tuples::ignore, object), DynamicObject::GetObjects("Endpoint")) { Endpoint::Ptr endpoint = dynamic_pointer_cast(object); + if (endpoint->IsLocal()) + continue; + histogram[endpoint] = 0; }