Improve variable names in ApiListener::SendConfigUpdate()

This commit is contained in:
Michael Friedrich 2018-10-25 14:30:34 +02:00
parent a4b48fc7f4
commit 6105ace50f
1 changed files with 6 additions and 4 deletions

View File

@ -164,11 +164,11 @@ void ApiListener::SendConfigUpdate(const JsonRpcConnection::Ptr& aclient)
Endpoint::Ptr endpoint = aclient->GetEndpoint();
ASSERT(endpoint);
Zone::Ptr azone = endpoint->GetZone();
Zone::Ptr lzone = Zone::GetLocalZone();
Zone::Ptr clientZone = endpoint->GetZone();
Zone::Ptr localZone = Zone::GetLocalZone();
/* don't try to send config updates to our master */
if (!azone->IsChildOf(lzone))
if (!clientZone->IsChildOf(localZone))
return;
Dictionary::Ptr configUpdateV1 = new Dictionary();
@ -181,9 +181,11 @@ void ApiListener::SendConfigUpdate(const JsonRpcConnection::Ptr& aclient)
String zoneName = zone->GetName();
String zoneDir = zonesDir + zoneName;
if (!zone->IsChildOf(azone) && !zone->IsGlobal())
/* Only sync child and global zones. */
if (!zone->IsChildOf(clientZone) && !zone->IsGlobal())
continue;
/* Zone was configured, but there's no configuration directory. */
if (!Utility::PathExists(zoneDir))
continue;