From: Michael Friedrich Date: Thu, 15 Oct 2015 15:15:19 +0000 (+0200) Subject: Fix wrong connection log message for global zones X-Git-Tag: v2.3.11~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d85ba84a9ad06fe7841e9fd984000cbc03b1340f;p=icinga2 Fix wrong connection log message for global zones fixes #10377 --- diff --git a/lib/remote/apilistener.cpp b/lib/remote/apilistener.cpp index b53168d43..f7c285dfc 100644 --- a/lib/remote/apilistener.cpp +++ b/lib/remote/apilistener.cpp @@ -373,6 +373,10 @@ void ApiListener::ApiTimerHandler(void) Zone::Ptr my_zone = Zone::GetLocalZone(); BOOST_FOREACH(const Zone::Ptr& zone, DynamicType::GetObjectsByType()) { + /* 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")