summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShane Kearns <ext-shane.2.kearns@nokia.com>2012-05-04 10:18:38 (GMT)
committerQt by Nokia <qt-info@nokia.com>2012-05-08 22:55:51 (GMT)
commit3739b68406b8ada6993a8c00d0b06bc9e5b719e5 (patch)
tree25f97737704554f5ab196b1f7fce7a993f51c349
parent51f6e634fdd3b58ef0586e5f2b754b7fbba6b52c (diff)
downloadQt-3739b68406b8ada6993a8c00d0b06bc9e5b719e5.zip
Qt-3739b68406b8ada6993a8c00d0b06bc9e5b719e5.tar.gz
Qt-3739b68406b8ada6993a8c00d0b06bc9e5b719e5.tar.bz2
Remove not present networks from QNetworkInterface::allInterfaces
Windows 7 accumulates networks over time with the status "not present". This is so it can remember whether a given network was a public, home or work network next time you use it. By default, these networks are not returned when enumerating network interfaces, but we specified a flag to request all networks. These networks are generally not useful so use the default behaviour of not reporting them. Task-number: QTBUG-18824 Change-Id: I4edc4cea83a0e97a88ac649b7d8af95a8a600b89 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 360c481840ece253bf7235e901508c96a085e018)
-rw-r--r--src/network/kernel/qnetworkinterface_win.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/network/kernel/qnetworkinterface_win.cpp b/src/network/kernel/qnetworkinterface_win.cpp
index 9616f14..f2bb172 100644
--- a/src/network/kernel/qnetworkinterface_win.cpp
+++ b/src/network/kernel/qnetworkinterface_win.cpp
@@ -137,8 +137,7 @@ static QList<QNetworkInterfacePrivate *> interfaceListingWinXP()
ULONG bufSize = sizeof staticBuf;
const QHash<QHostAddress, QHostAddress> &ipv4netmasks = ipv4Netmasks();
- ULONG flags = GAA_FLAG_INCLUDE_ALL_INTERFACES |
- GAA_FLAG_INCLUDE_PREFIX |
+ ULONG flags = GAA_FLAG_INCLUDE_PREFIX |
GAA_FLAG_SKIP_DNS_SERVER |
GAA_FLAG_SKIP_MULTICAST;
ULONG retval = ptrGetAdaptersAddresses(AF_UNSPEC, flags, NULL, pAdapter, &bufSize);