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

index 2023744afffa0093d965714c430c3657557096fb..7ebcdd4ce9626fa08e8a417dd67b4bb753409d7c 100644 (file)
@@ -292,6 +292,7 @@ void Client::enterConnectingState()
 qDebug() << "Entering Connecting State";
 #endif
 
+       qDebug() << "Host address is:" << m_hostAddress;
        if (!m_hostAddress.isNull())
        {
                if (socket->bind(QHostAddress::Any, m_localPort))
@@ -309,6 +310,8 @@ qDebug() << "Successful connection";
                emit connectionError();
                return;
        }
+
+       qDebug() << "Resolving Host address";
        QHostInfo::lookupHost(m_host, this, SLOT(lookedUp(QHostInfo)));
 }
 
@@ -326,13 +329,11 @@ qDebug() << "Host lookup finished";
                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];