summaryrefslogtreecommitdiffstats
path: root/src/network/socket/qnativesocketengine_unix.cpp
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@digia.com>2014-06-05 22:26:44 +0200
committerJ-P Nurmi <jpnurmi@digia.com>2014-06-05 22:26:44 +0200
commit0fcce50af009f97efa2a5c5f2c74415c92830962 (patch)
treef8abf0e4f445fed9480b426b2f856b50911f1210 /src/network/socket/qnativesocketengine_unix.cpp
parent74d46a669badc5bf32187686102ca4e644a3c0af (diff)
parentc54f7720d09e7d00f3309736bbeaaa6a81967ec1 (diff)
Merge remote-tracking branch 'origin/stable' into dev
Conflicts: mkspecs/features/qt.prf src/plugins/platforms/xcb/qxcbwindow.h src/tools/qdoc/qdocindexfiles.cpp src/widgets/kernel/qwidget_qpa.cpp Change-Id: I214f57b03bc2ff86cf3b7dfe2966168af93a5a67
Diffstat (limited to 'src/network/socket/qnativesocketengine_unix.cpp')
-rw-r--r--src/network/socket/qnativesocketengine_unix.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/network/socket/qnativesocketengine_unix.cpp b/src/network/socket/qnativesocketengine_unix.cpp
index 5e2fc1233d..472e0cb98c 100644
--- a/src/network/socket/qnativesocketengine_unix.cpp
+++ b/src/network/socket/qnativesocketengine_unix.cpp
@@ -111,13 +111,15 @@ static inline void qt_socket_getPortAndAddress(const qt_sockaddr *s, quint16 *po
QHostAddress tmpAddress;
tmpAddress.setAddress(tmp);
*addr = tmpAddress;
+ if (s->a6.sin6_scope_id) {
#ifndef QT_NO_IPV6IFNAME
- char scopeid[IFNAMSIZ];
- if (::if_indextoname(s->a6.sin6_scope_id, scopeid)) {
- addr->setScopeId(QLatin1String(scopeid));
- } else
+ char scopeid[IFNAMSIZ];
+ if (::if_indextoname(s->a6.sin6_scope_id, scopeid)) {
+ addr->setScopeId(QLatin1String(scopeid));
+ } else
#endif
- addr->setScopeId(QString::number(s->a6.sin6_scope_id));
+ addr->setScopeId(QString::number(s->a6.sin6_scope_id));
+ }
}
if (port)
*port = ntohs(s->a6.sin6_port);