mirror of https://github.com/Icinga/icinga2.git
parent
16a2d36bdc
commit
56514f6955
|
@ -142,7 +142,7 @@ void ApiListener::SendConfigUpdate(const ApiClient::Ptr& aclient)
|
||||||
Zone::Ptr lzone = Zone::GetLocalZone();
|
Zone::Ptr lzone = Zone::GetLocalZone();
|
||||||
|
|
||||||
/* don't try to send config updates to our master */
|
/* don't try to send config updates to our master */
|
||||||
if (lzone->IsChildOf(azone))
|
if (!azone->IsChildOf(lzone))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Dictionary::Ptr configUpdate = make_shared<Dictionary>();
|
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)
|
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;
|
return Empty;
|
||||||
|
|
||||||
ApiListener::Ptr listener = ApiListener::GetInstance();
|
ApiListener::Ptr listener = ApiListener::GetInstance();
|
||||||
|
|
Loading…
Reference in New Issue