Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/ntoskrnl.exe/ntoskrnl.c | 5 +++++ dlls/ntoskrnl.exe/tests/ntoskrnl.c | 3 +-- server/device.c | 2 +- server/protocol.def | 1 + 4 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index 42976f4905e..1bd5d6fb351 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -949,11 +949,16 @@ NTSTATUS CDECL wine_ntoskrnl_main_loop( HANDLE stop_event ) out_buff = NULL; /* do not transfer back input buffer */
req->prev = wine_server_obj_handle( context.irp_data->handle ); + req->pending = irp->PendingReturned; req->iosb_status = irp->IoStatus.u.Status; req->result = irp->IoStatus.Information; if (!NT_ERROR(irp->IoStatus.u.Status) && out_buff) wine_server_add_data( req, out_buff, irp->IoStatus.Information ); } + else + { + req->pending = 1; + } } else { diff --git a/dlls/ntoskrnl.exe/tests/ntoskrnl.c b/dlls/ntoskrnl.exe/tests/ntoskrnl.c index 7c4b0154781..f0e8021aa17 100644 --- a/dlls/ntoskrnl.exe/tests/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/tests/ntoskrnl.c @@ -882,8 +882,7 @@ static void do_return_status(ULONG ioctl, struct return_status_params *params) } else { - todo_wine_if (params->ret_status != STATUS_PENDING) - ok(!ret, "got %#x\n", ret); + ok(!ret, "got %#x\n", ret); } if (!ret) { diff --git a/server/device.c b/server/device.c index df1a71a5a4d..5abe1e3bb00 100644 --- a/server/device.c +++ b/server/device.c @@ -954,7 +954,7 @@ DECL_HANDLER(get_next_device_request)
if (irp->async) { - if (req->status == STATUS_PENDING) + if (req->pending) set_async_pending( irp->async ); async_set_initial_status( irp->async, req->status );
diff --git a/server/protocol.def b/server/protocol.def index 608c481db27..421a46c130d 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -3366,6 +3366,7 @@ struct handle_info @REQ(get_next_device_request) obj_handle_t manager; /* handle to the device manager */ obj_handle_t prev; /* handle to the previous irp */ + int pending; /* was the previous irp marked pending? */ unsigned int status; /* status of the previous irp */ client_ptr_t user_ptr; /* user pointer of the previous irp */ unsigned int iosb_status; /* IOSB status of the previous irp */