]> granicus.if.org Git - icinga2/commitdiff
Improve variable names in ApiListener::SendConfigUpdate()
authorMichael Friedrich <michael.friedrich@icinga.com>
Thu, 25 Oct 2018 12:30:34 +0000 (14:30 +0200)
committerMichael Friedrich <michael.friedrich@icinga.com>
Wed, 19 Jun 2019 12:46:11 +0000 (14:46 +0200)
lib/remote/apilistener-filesync.cpp

index b6aad6428fbdc29efacc744b661a38636a26bb3c..958a6c682921fb795d76b929760de0ba9fcd4860 100644 (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;