ws2_32: Wait for synchronous ioctl completion in server_ioctl_sock().

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2021-06-04 16:24:19 -05:00 committed by Alexandre Julliard
parent 8c26fca5c2
commit aadcff491f
1 changed files with 10 additions and 0 deletions

View File

@ -3188,6 +3188,10 @@ static DWORD server_ioctl_sock( SOCKET s, DWORD code, LPVOID in_buff, DWORD in_s
if (!((ULONG_PTR)overlapped->hEvent & 1)) cvalue = overlapped;
event = overlapped->hEvent;
}
else
{
if (!(event = get_sync_event())) return GetLastError();
}
if (completion)
{
@ -3198,6 +3202,12 @@ static DWORD server_ioctl_sock( SOCKET s, DWORD code, LPVOID in_buff, DWORD in_s
status = NtDeviceIoControlFile( handle, event, apc, cvalue, piosb, code,
in_buff, in_size, out_buff, out_size );
if (status == STATUS_PENDING && !overlapped)
{
if (WaitForSingleObject( event, INFINITE ) == WAIT_FAILED)
return -1;
status = piosb->u.Status;
}
if (status == STATUS_NOT_SUPPORTED)
{
FIXME("Unsupported ioctl %x (device=%x access=%x func=%x method=%x)\n",