]> Some of my projects - anidbudpclient.git/commitdiff
Add debug statements for resolving the API host name.
authorAPTX <marek321@gmail.com>
Sun, 25 Oct 2015 11:56:50 +0000 (12:56 +0100)
committerAPTX <marek321@gmail.com>
Sun, 25 Oct 2015 11:56:50 +0000 (12:56 +0100)
client.cpp

index 634e2bc7408e4d9f2ed9976fc26be51b243284ea..2023744afffa0093d965714c430c3657557096fb 100644 (file)
@@ -325,6 +325,15 @@ qDebug() << "Host lookup finished";
                emit connectionError();
                return;
        }
+
+#ifdef ANIDBUDPCLIENT_CLIENT_MISC_DEBUG
+       qDebug() << "Resolved" << hostInfo.hostName()
+                        << "to the following addresses:";
+       for (auto&& address : hostInfo.addresses())
+               qDebug() << address;
+       qDebug() << "Using" << hostInfo.addresses()[0];
+#endif
+
        m_hostAddress = hostInfo.addresses()[0];
 
        // TODO could it be nicer?