summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAleksandar Sasha Babic <aleksandar.babic@nokia.com>2010-06-18 15:25:56 (GMT)
committerAleksandar Sasha Babic <aleksandar.babic@nokia.com>2010-06-18 15:25:56 (GMT)
commit2ee850be142dbdc47ba9611c94cd9bd47792a67a (patch)
treedd9974d517ca977998e232597d5eb8f5d05883c1 /src
parent65f2273f43bfca718ee51e8d491c76ef830238f7 (diff)
downloadQt-2ee850be142dbdc47ba9611c94cd9bd47792a67a.zip
Qt-2ee850be142dbdc47ba9611c94cd9bd47792a67a.tar.gz
Qt-2ee850be142dbdc47ba9611c94cd9bd47792a67a.tar.bz2
Fix QTBUG-8687.
The fix is based on 9897aece975e0a4a77e0cc6b8590305baba1fccb. Task-number: QTBUG-8687 Reviewed-by: TrustMe
Diffstat (limited to 'src')
-rw-r--r--src/network/kernel/qhostinfo_unix.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/network/kernel/qhostinfo_unix.cpp b/src/network/kernel/qhostinfo_unix.cpp
index 79f4b9b..9139816 100644
--- a/src/network/kernel/qhostinfo_unix.cpp
+++ b/src/network/kernel/qhostinfo_unix.cpp
@@ -209,7 +209,9 @@ QHostInfo QHostInfoAgent::fromName(const QString &hostName)
hints.ai_flags = Q_ADDRCONFIG;
#endif
#ifdef Q_OS_SYMBIAN
- qDebug() << "Setting flags: 'hints.ai_flags &= AI_V4MAPPED | AI_ALL'";
+# ifdef QHOSTINFO_DEBUG
+ qDebug() << "Setting flags: 'hints.ai_flags &= AI_V4MAPPED | AI_ALL'";
+# endif
#endif
int result = getaddrinfo(aceHostname.constData(), 0, &hints, &res);
@@ -218,7 +220,9 @@ QHostInfo QHostInfoAgent::fromName(const QString &hostName)
// if the lookup failed with AI_ADDRCONFIG set, try again without it
hints.ai_flags = 0;
#ifdef Q_OS_SYMBIAN
+# ifdef QHOSTINFO_DEBUG
qDebug() << "Setting flags: 'hints.ai_flags &= AI_V4MAPPED | AI_ALL'";
+# endif
hints.ai_flags &= AI_V4MAPPED | AI_ALL;
#endif
result = getaddrinfo(aceHostname.constData(), 0, &hints, &res);
@@ -229,8 +233,9 @@ QHostInfo QHostInfoAgent::fromName(const QString &hostName)
addrinfo *node = res;
QList<QHostAddress> addresses;
while (node) {
- qDebug() << "getaddrinfo node: flags:" << node->ai_flags << "family:" << node->ai_family << "ai_socktype:" << node->ai_socktype << "ai_protocol:" << node->ai_protocol << "ai_addrlen:" << node->ai_addrlen;
-
+#ifdef QHOSTINFO_DEBUG
+ qDebug() << "getaddrinfo node: flags:" << node->ai_flags << "family:" << node->ai_family << "ai_socktype:" << node->ai_socktype << "ai_protocol:" << node->ai_protocol << "ai_addrlen:" << node->ai_addrlen;
+#endif
if (node->ai_family == AF_INET) {
QHostAddress addr;
addr.setAddress(ntohl(((sockaddr_in *) node->ai_addr)->sin_addr.s_addr));