Commit 49b834bb authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

server: Use current thread for IRP calls without associated thread.

parent 51a73216
......@@ -951,12 +951,14 @@ DECL_HANDLER(get_next_device_request)
if ((ptr = list_head( &manager->requests )))
{
struct thread *thread;
irp = LIST_ENTRY( ptr, struct irp_call, mgr_entry );
if (irp->thread)
{
reply->client_thread = get_kernel_object_ptr( manager, &irp->thread->obj );
reply->client_tid = get_thread_id( irp->thread );
}
thread = irp->thread ? irp->thread : current;
reply->client_thread = get_kernel_object_ptr( manager, &thread->obj );
reply->client_tid = get_thread_id( thread );
iosb = irp->iosb;
reply->in_size = iosb->in_size;
if (iosb->in_size > get_reply_max_size()) set_error( STATUS_BUFFER_OVERFLOW );
......
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