Fix config sync problem.

Fixes #6212
Fixes #6242
This commit is contained in:
Gunnar Beutner 2014-05-23 18:35:43 +02:00
parent 16a2d36bdc
commit 56514f6955
1 changed files with 2 additions and 2 deletions

View File

@ -142,7 +142,7 @@ void ApiListener::SendConfigUpdate(const ApiClient::Ptr& aclient)
Zone::Ptr lzone = Zone::GetLocalZone();
/* don't try to send config updates to our master */
if (lzone->IsChildOf(azone))
if (!azone->IsChildOf(lzone))
return;
Dictionary::Ptr configUpdate = make_shared<Dictionary>();
@ -171,7 +171,7 @@ void ApiListener::SendConfigUpdate(const ApiClient::Ptr& aclient)
Value ApiListener::ConfigUpdateHandler(const MessageOrigin& origin, const Dictionary::Ptr& params)
{
if (!origin.FromZone || !Zone::GetLocalZone()->IsChildOf(origin.FromZone))
if (!origin.FromClient->GetEndpoint() || (origin.FromZone && !Zone::GetLocalZone()->IsChildOf(origin.FromZone)))
return Empty;
ApiListener::Ptr listener = ApiListener::GetInstance();