Commit 1975398b authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

ws2_32: Translate AFD_POLL_RESET to FD_CLOSE plus WSAECONNABORTED in WSAEnumNetworkEvents().

parent 2f0153df
......@@ -3629,7 +3629,10 @@ int WINAPI WSAEnumNetworkEvents( SOCKET s, WSAEVENT event, WSANETWORKEVENTS *ret
if (ret_events->lNetworkEvents & FD_CLOSE)
{
if (!(ret_events->iErrorCode[FD_CLOSE_BIT] = NtStatusToWSAError( params.status[AFD_POLL_BIT_HUP] )))
ret_events->iErrorCode[FD_CLOSE_BIT] = NtStatusToWSAError( params.status[AFD_POLL_BIT_RESET] );
{
if (params.flags & AFD_POLL_RESET)
ret_events->iErrorCode[FD_CLOSE_BIT] = WSAECONNABORTED;
}
}
}
SetLastError( NtStatusToWSAError( status ) );
......
......@@ -6290,7 +6290,7 @@ static void check_events_(int line, struct event_test_ctx *ctx,
for (i = 0; i < ARRAY_SIZE(events.iErrorCode); ++i)
{
if ((1u << i) == LOWORD(flag1) && (events.lNetworkEvents & LOWORD(flag1)))
todo_wine_if (HIWORD(flag1)) ok_(__FILE__, line)(events.iErrorCode[i] == HIWORD(flag1),
ok_(__FILE__, line)(events.iErrorCode[i] == HIWORD(flag1),
"got error code %d for event %#x\n", events.iErrorCode[i], 1u << i);
if ((1u << i) == LOWORD(flag2) && (events.lNetworkEvents & LOWORD(flag2)))
ok_(__FILE__, line)(events.iErrorCode[i] == HIWORD(flag2),
......
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