Commit 6fe23ed8 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

ntdll: Do not fill the IOSB in NtDeviceIoControlFile() if the NT status denotes error.

parent c2384cf2
......@@ -5735,7 +5735,7 @@ NTSTATUS WINAPI NtDeviceIoControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUT
return server_ioctl_file( handle, event, apc, apc_context, io, code,
in_buffer, in_size, out_buffer, out_size );
if (status != STATUS_PENDING) io->u.Status = status;
if (status != STATUS_PENDING && !NT_ERROR(status)) io->u.Status = status;
return status;
}
......
......@@ -688,7 +688,7 @@ static void test_poll(void)
ret = NtDeviceIoControlFile((HANDLE)client, event, NULL, NULL, &io,
IOCTL_AFD_POLL, in_params, params_size, out_params, params_size);
ok(ret == STATUS_INVALID_HANDLE, "got %#x\n", ret);
todo_wine ok(!io.Status, "got %#x\n", io.Status);
ok(!io.Status, "got %#x\n", io.Status);
ok(!io.Information, "got %#Ix\n", io.Information);
/* Test passing the same handle twice. */
......@@ -1201,7 +1201,7 @@ static void test_recv(void)
memset(&io, 0, sizeof(io));
ret = NtDeviceIoControlFile((HANDLE)listener, event, NULL, NULL, &io, IOCTL_AFD_RECV, NULL, 0, NULL, 0);
todo_wine ok(ret == STATUS_INVALID_CONNECTION, "got %#x\n", ret);
todo_wine ok(!io.Status, "got status %#x\n", io.Status);
ok(!io.Status, "got status %#x\n", io.Status);
ok(!io.Information, "got information %#Ix\n", io.Information);
client = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
......@@ -1213,7 +1213,7 @@ static void test_recv(void)
memset(&io, 0, sizeof(io));
ret = NtDeviceIoControlFile((HANDLE)client, event, NULL, NULL, &io, IOCTL_AFD_RECV, NULL, 0, NULL, 0);
ok(ret == STATUS_INVALID_PARAMETER, "got %#x\n", ret);
todo_wine ok(!io.Status, "got status %#x\n", io.Status);
ok(!io.Status, "got status %#x\n", io.Status);
ok(!io.Information, "got information %#Ix\n", io.Information);
wsabufs[0].len = sizeof(buffer);
......@@ -1301,7 +1301,7 @@ static void test_recv(void)
ret = NtDeviceIoControlFile((HANDLE)client, event, NULL, NULL, &io,
IOCTL_AFD_RECV, &params, sizeof(params), NULL, 0);
ok(ret == STATUS_DEVICE_NOT_READY, "got %#x\n", ret);
todo_wine ok(!io.Status, "got status %#x\n", io.Status);
ok(!io.Status, "got status %#x\n", io.Status);
ok(!io.Information, "got information %#Ix\n", io.Information);
ret = send(server, "data", 5, 0);
......@@ -1368,7 +1368,7 @@ static void test_recv(void)
ret = NtDeviceIoControlFile((HANDLE)client, event, NULL, NULL, &io,
IOCTL_AFD_RECV, &params, sizeof(params), NULL, 0);
ok(ret == STATUS_INVALID_PARAMETER, "got %#x\n", ret);
todo_wine ok(io.Status == 0xdeadbeef, "got %#x\n", io.Status);
ok(io.Status == 0xdeadbeef, "got %#x\n", io.Status);
params.msg_flags = AFD_MSG_OOB | AFD_MSG_NOT_OOB;
......@@ -1376,7 +1376,7 @@ static void test_recv(void)
ret = NtDeviceIoControlFile((HANDLE)client, event, NULL, NULL, &io,
IOCTL_AFD_RECV, &params, sizeof(params), NULL, 0);
ok(ret == STATUS_INVALID_PARAMETER, "got %#x\n", ret);
todo_wine ok(io.Status == 0xdeadbeef, "got %#x\n", io.Status);
ok(io.Status == 0xdeadbeef, "got %#x\n", io.Status);
params.msg_flags = AFD_MSG_OOB;
......
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