Re: [PATCH 4/4] ws2_32: implement AcceptEx and GetAcceptExSockaddrs
Mike Kaplinskiy <mike.kaplinskiy(a)gmail.com> writes:
/*********************************************************************** + * WS2_async_recv_accept (INTERNAL) + * + * This function is used to finish the read part of an accept request. It is + * needed to place the completion on the correct socket (listener). + */ +static NTSTATUS WINAPI WS2_async_recv_accept( void *arg, IO_STATUS_BLOCK *iosb, NTSTATUS status ) +{ + void *junk; + struct ws2_accept_async *wsa = arg; + + status = WS2_async_recv( wsa->read, iosb, status, &junk ); + if (status == STATUS_PENDING) + return status; + + if (wsa->user_overlapped->hEvent) + SetEvent(wsa->user_overlapped->hEvent); + if (wsa->cvalue) + WS_AddCompletion( HANDLE2SOCKET(wsa->listen_socket), wsa->cvalue, iosb->u.Status, iosb->Information ); + HeapFree( GetProcessHeap(), 0, wsa->read ); + HeapFree( GetProcessHeap(), 0, wsa ); + + return status; +} + +/*********************************************************************** + * WS2_async_accept (INTERNAL) + * + * This is the function called to satisfy the AcceptEx callback + */ +static NTSTATUS WINAPI WS2_async_accept( void *arg, IO_STATUS_BLOCK *iosb, NTSTATUS status ) +{
These are not valid async callbacks, the way async callbacks work has changed since the patch was first written. -- Alexandre Julliard julliard(a)winehq.org
participants (1)
-
Alexandre Julliard