ntdll: Fill the I/O status block with the results of the recv_socket call in sock_recv().

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2021-07-26 11:53:47 -05:00 committed by Alexandre Julliard
parent 4c639d6926
commit 86e521d5bb
2 changed files with 7 additions and 8 deletions

View File

@ -615,12 +615,6 @@ static NTSTATUS sock_recv( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, voi
if (status == STATUS_DEVICE_NOT_READY && force_async)
status = STATUS_PENDING;
if (!NT_ERROR(status))
{
io->Status = status;
io->Information = information;
}
SERVER_START_REQ( recv_socket )
{
req->status = status;
@ -630,6 +624,11 @@ static NTSTATUS sock_recv( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, voi
status = wine_server_call( req );
wait_handle = wine_server_ptr_handle( reply->wait );
options = reply->options;
if ((!NT_ERROR(status) || wait_handle) && status != STATUS_PENDING)
{
io->Status = status;
io->Information = information;
}
}
SERVER_END_REQ;

View File

@ -978,8 +978,8 @@ static void test_recv(void)
ret = NtDeviceIoControlFile((HANDLE)client, event, NULL, NULL, &io,
IOCTL_AFD_RECV, &params, sizeof(params), NULL, 0);
ok(ret == STATUS_PENDING, "got %#x\n", ret);
todo_wine ok(!io.Status, "got status %#x\n", io.Status);
todo_wine ok(!io.Information, "got information %#Ix\n", io.Information);
ok(!io.Status, "got status %#x\n", io.Status);
ok(!io.Information, "got information %#Ix\n", io.Information);
ret = send(server, "data", 5, 0);
ok(ret == 5, "got %d\n", ret);