From a582b2c191ef088d32913039ce67157a3de99e0b Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Wed, 9 May 2012 15:09:14 +0200 Subject: [PATCH] Bugfix for the welcome message. --- components/discovery/discoverycomponent.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/discovery/discoverycomponent.cpp b/components/discovery/discoverycomponent.cpp index bd1f3e1bf..7d42b0221 100644 --- a/components/discovery/discoverycomponent.cpp +++ b/components/discovery/discoverycomponent.cpp @@ -484,7 +484,9 @@ void DiscoveryComponent::ProcessDiscoveryMessage(string identity, DiscoveryMessa if (IsBroker()) SendDiscoveryMessage("discovery::NewComponent", identity, Endpoint::Ptr()); - if (endpoint) + /* don't send a welcome message for discovery::RegisterComponent + messages unless we're a broker */ + if (endpoint && (trusted || IsBroker())) FinishDiscoverySetup(endpoint); }