Commit 5a8dc6cd authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

ws2_32: Use NtStatusToWSAError() in WSAGetOverlappedResult().

parent 54a39d57
......@@ -5737,7 +5737,7 @@ BOOL WINAPI WSAGetOverlappedResult( SOCKET s, LPWSAOVERLAPPED lpOverlapped,
if ( lpdwFlags )
*lpdwFlags = lpOverlapped->u.s.Offset;
if (status) SetLastError( RtlNtStatusToDosError(status) );
SetLastError( NtStatusToWSAError(status) );
return !status;
}
......
......@@ -8701,14 +8701,9 @@ static void test_WSAGetOverlappedResult(void)
}
else
{
todo_wine_if (!NT_SUCCESS(status)
&& LOWORD(status) != WSAEINVAL
&& status != STATUS_CANCELLED
&& status != (0x80070000 | ERROR_IO_INCOMPLETE)
&& status != (0xc0070000 | ERROR_IO_INCOMPLETE))
ok(WSAGetLastError() == expect
|| (status == (0xc0070000 | ERROR_IO_INCOMPLETE) && WSAGetLastError() == WSAEINVAL), /* < win8 */
"status %#x: expected error %u, got %u\n", status, expect, WSAGetLastError());
ok(WSAGetLastError() == expect
|| (status == (0xc0070000 | ERROR_IO_INCOMPLETE) && WSAGetLastError() == WSAEINVAL), /* < win8 */
"status %#x: expected error %u, got %u\n", status, expect, WSAGetLastError());
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment