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

This commit is contained in:
Zebediah Figura 2022-07-21 19:56:28 -05:00 committed by Alexandre Julliard
parent 2f0153df7c
commit 1975398bd1
2 changed files with 5 additions and 2 deletions

View file

@ -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 ) );

View file

@ -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),