]> granicus.if.org Git - icinga2/commitdiff
ApiListener: Fix misleading connection log messages
authorMichael Friedrich <michael.friedrich@gmail.com>
Fri, 20 Feb 2015 14:11:44 +0000 (15:11 +0100)
committerMichael Friedrich <michael.friedrich@gmail.com>
Fri, 20 Feb 2015 14:11:44 +0000 (15:11 +0100)
fixes #8493

lib/remote/apilistener.cpp

index e007f323ffd7ab0c9a674109de4fe81514460390..a62bc7edf14180b29494ad389f926fe5be6e24e6 100644 (file)
@@ -380,7 +380,7 @@ void ApiListener::ApiTimerHandler(void)
                        /* 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")
-                                   << "Not connecting to Endpoint '" << zone->GetName() << "' because it's not in the same zone, a parent or a child zone.";
+                                   << "Not connecting to Zone '" << zone->GetName() << "' because it's not in the same zone, a parent or a child zone.";
                                continue;
                        }
 
@@ -396,7 +396,7 @@ void ApiListener::ApiTimerHandler(void)
                        /* don't connect to an endpoint if we already have a connection to the zone */
                        if (connected) {
                                Log(LogDebug, "ApiListener")
-                                   << "Not connecting to Endpoint '" << zone->GetName() << "' because we're already connected to it.";
+                                   << "Not connecting to Zone '" << zone->GetName() << "' because we're already connected to it.";
                                continue;
                        }
 
@@ -404,21 +404,21 @@ void ApiListener::ApiTimerHandler(void)
                                /* don't connect to ourselves */
                                if (endpoint->GetName() == GetIdentity()) {
                                        Log(LogDebug, "ApiListener")
-                                           << "Not connecting to Endpoint '" << zone->GetName() << "' because that's us.";
+                                           << "Not connecting to Endpoint '" << endpoint->GetName() << "' because that's us.";
                                        continue;
                                }
 
                                /* don't try to connect to endpoints which don't have a host and port */
                                if (endpoint->GetHost().IsEmpty() || endpoint->GetPort().IsEmpty()) {
                                        Log(LogDebug, "ApiListener")
-                                           << "Not connecting to Endpoint '" << zone->GetName() << "' because the host/port attributes are missing.";
+                                           << "Not connecting to Endpoint '" << endpoint->GetName() << "' because the host/port attributes are missing.";
                                        continue;
                                }
 
                                /* don't try to connect if there's already a connection attempt */
                                if (endpoint->GetConnecting()) {
                                        Log(LogDebug, "ApiListener")
-                                           << "Not connecting to Endpoint '" << zone->GetName() << "' because we're already trying to connect to it.";
+                                           << "Not connecting to Endpoint '" << endpoint->GetName() << "' because we're already trying to connect to it.";
                                        continue;
                                }