From 6698d09a72bfbaeff8407b794a54b162de5bfd8e Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Thu, 12 Sep 2013 15:38:01 +0200 Subject: [PATCH] cluster: More delegation bugfixes. --- components/cluster/clustercomponent.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/components/cluster/clustercomponent.cpp b/components/cluster/clustercomponent.cpp index bed6ca409..671578e3f 100644 --- a/components/cluster/clustercomponent.cpp +++ b/components/cluster/clustercomponent.cpp @@ -1133,7 +1133,7 @@ void ClusterComponent::CheckAuthorityHandler(const DynamicObject::Ptr& object, c BOOST_FOREACH(const Endpoint::Ptr& endpoint, DynamicType::GetObjects()) { bool match = false; - if (!endpoint->IsConnected() || !endpoint->HasFeature(type)) + if ((!endpoint->IsConnected() && endpoint->GetName() != GetIdentity()) || !endpoint->HasFeature(type)) continue; if (authorities) { @@ -1153,8 +1153,11 @@ void ClusterComponent::CheckAuthorityHandler(const DynamicObject::Ptr& object, c endpoints.push_back(endpoint->GetName()); } - if (endpoints.empty()) + if (endpoints.empty()) { + result = false; + return; + } std::sort(endpoints.begin(), endpoints.end()); -- 2.40.0