Bugfix: The delegation component should use only non-local checker endpoints.

This commit is contained in:
Gunnar Beutner 2012-10-12 10:33:11 +02:00
parent ec0e319d8a
commit 26da51e071
1 changed files with 9 additions and 1 deletions

View File

@ -44,8 +44,13 @@ vector<Endpoint::Ptr> DelegationComponent::GetCheckerCandidates(const Service::P
BOOST_FOREACH(tie(tuples::ignore, object), DynamicObject::GetObjects("Endpoint")) {
Endpoint::Ptr endpoint = dynamic_pointer_cast<Endpoint>(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<Endpoint>(object);
if (endpoint->IsLocal())
continue;
histogram[endpoint] = 0;
}