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>
This commit is contained in:
parent
9e740c7266
commit
aab81f51b8
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user