summaryrefslogtreecommitdiffstats
path: root/tests/auto/network/socket/platformsocketengine
diff options
context:
space:
mode:
authorTomasz Kozłowski <tomasz.kozlowski@qt.io>2023-11-15 14:26:35 +0100
committerTomasz Kozłowski <tomasz.kozlowski@qt.io>2023-11-23 19:26:49 +0100
commitaab81f51b83456ba96696b5a668ada47e9a53c5a (patch)
tree16e0c77e823a5956127767cf03d89c7afa97120e /tests/auto/network/socket/platformsocketengine
parent9e740c7266fb72c3e9dfcfde9912510180b600c2 (diff)
Change created socket protocol to IPv4 in broadcast test
Broadcasting is only supported with IPv4. Previously set AnyIPProtocol was handled the same as IPv6, which does not support it, so system library was returning error code and initialization was failing. Task-number: QTBUG-115777 Change-Id: Iefb1c7237d18cd7af7ccd53f7e5f3f5749a12fd1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/network/socket/platformsocketengine')
-rw-r--r--tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp b/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp
index 7b1b0ad666..2d5e97b478 100644
--- a/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp
+++ b/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp
@@ -255,7 +255,7 @@ void tst_PlatformSocketEngine::broadcastTest()
PLATFORMSOCKETENGINE broadcastSocket;
// Initialize a regular Udp socket
- QVERIFY(broadcastSocket.initialize(QAbstractSocket::UdpSocket, QAbstractSocket::AnyIPProtocol));
+ QVERIFY(broadcastSocket.initialize(QAbstractSocket::UdpSocket, QAbstractSocket::IPv4Protocol));
// Bind to any port on all interfaces
QVERIFY(broadcastSocket.bind(QHostAddress::Any, 0));