QNativeSocketEnginePrivate (win) read sender's port and address
even if recvmsg results in WSAEMSGSIZE. Task-number: QTBUG-68755 Change-Id: I418e924b3e9001e7b7ad991e32d7d6f89ae499af Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
c42be96d80
commit
6afd5990c7
@ -1232,6 +1232,8 @@ qint64 QNativeSocketEnginePrivate::nativeReceiveDatagram(char *data, qint64 maxL
|
||||
// it is ok the buffer was to small if bytesRead is larger than
|
||||
// maxLength then assume bytes read is really maxLenth
|
||||
ret = qint64(bytesRead) > maxLength ? maxLength : qint64(bytesRead);
|
||||
if (options & QNativeSocketEngine::WantDatagramSender)
|
||||
qt_socket_getPortAndAddress(socketDescriptor, &aa, &header->senderPort, &header->senderAddress);
|
||||
} else {
|
||||
WS_ERROR_DEBUG(err);
|
||||
switch (err) {
|
||||
|
Loading…
Reference in New Issue
Block a user