]> granicus.if.org Git - icinga2/commitdiff
Fix wrong connection log message for global zones
authorMichael Friedrich <michael.friedrich@netways.de>
Thu, 15 Oct 2015 15:15:19 +0000 (17:15 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Thu, 15 Oct 2015 15:15:19 +0000 (17:15 +0200)
fixes #10377

lib/remote/apilistener.cpp

index b9b9a3b3941c329e90566989110377d6fc428a5d..29da538e61967f22feb74d774eb8943578974f41 100644 (file)
@@ -441,6 +441,10 @@ void ApiListener::ApiTimerHandler(void)
        Zone::Ptr my_zone = Zone::GetLocalZone();
 
        BOOST_FOREACH(const Zone::Ptr& zone, ConfigType::GetObjectsByType<Zone>()) {
+               /* don't connect to global zones */
+               if (zone->GetGlobal())
+                       continue;
+
                /* only connect to endpoints in a) the same zone b) our parent zone c) immediate child zones */
                if (my_zone != zone && my_zone != zone->GetParent() && zone != my_zone->GetParent()) {
                        Log(LogDebug, "ApiListener")