From 6105ace50f6331bf2519f21b67ad65c830eed11b Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Thu, 25 Oct 2018 14:30:34 +0200 Subject: [PATCH] Improve variable names in ApiListener::SendConfigUpdate() --- lib/remote/apilistener-filesync.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/remote/apilistener-filesync.cpp b/lib/remote/apilistener-filesync.cpp index b6aad6428..958a6c682 100644 --- a/lib/remote/apilistener-filesync.cpp +++ b/lib/remote/apilistener-filesync.cpp @@ -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;