mirror of
https://github.com/LizardByte/Sunshine.git
synced 2025-03-14 07:20:54 +00:00
Fix invalid parameter passed to WSASendMsg() (#2890)
The third parameter is for flags, not number of messages.
This commit is contained in:
parent
3935d305ae
commit
0ca560ced8
@ -1537,7 +1537,7 @@ namespace platf {
|
||||
|
||||
// If USO is not supported, this will fail and the caller will fall back to unbatched sends.
|
||||
DWORD bytes_sent;
|
||||
return WSASendMsg((SOCKET) send_info.native_socket, &msg, 1, &bytes_sent, nullptr, nullptr) != SOCKET_ERROR;
|
||||
return WSASendMsg((SOCKET) send_info.native_socket, &msg, 0, &bytes_sent, nullptr, nullptr) != SOCKET_ERROR;
|
||||
}
|
||||
|
||||
bool
|
||||
@ -1614,7 +1614,7 @@ namespace platf {
|
||||
msg.Control.len = cmbuflen;
|
||||
|
||||
DWORD bytes_sent;
|
||||
if (WSASendMsg((SOCKET) send_info.native_socket, &msg, 1, &bytes_sent, nullptr, nullptr) == SOCKET_ERROR) {
|
||||
if (WSASendMsg((SOCKET) send_info.native_socket, &msg, 0, &bytes_sent, nullptr, nullptr) == SOCKET_ERROR) {
|
||||
auto winerr = WSAGetLastError();
|
||||
BOOST_LOG(warning) << "WSASendMsg() failed: "sv << winerr;
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user