]> 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>
Fri, 16 Oct 2015 10:49:40 +0000 (12:49 +0200)
fixes #10377

lib/remote/apilistener.cpp

index b53168d4355502c60a690ad37b6d19402dfdc5a7..f7c285dfc0d1a6fda2d2f4e10c6e90a3efa8376e 100644 (file)
@@ -373,6 +373,10 @@ void ApiListener::ApiTimerHandler(void)
        Zone::Ptr my_zone = Zone::GetLocalZone();
 
        BOOST_FOREACH(const Zone::Ptr& zone, DynamicType::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")