Jacek Caban : server: Use current thread for IRP calls without associated thread.
Alexandre Julliard
julliard at winehq.org
Thu May 30 16:27:13 CDT 2019
Module: wine
Branch: master
Commit: 49b834bb42150183c0d707a328a6bf54c7bc010b
URL: https://source.winehq.org/git/wine.git/?a=commit;h=49b834bb42150183c0d707a328a6bf54c7bc010b
Author: Jacek Caban <jacek at codeweavers.com>
Date: Thu May 30 13:11:52 2019 +0200
server: Use current thread for IRP calls without associated thread.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
server/device.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/server/device.c b/server/device.c
index ee7df5a..bc27108 100644
--- a/server/device.c
+++ b/server/device.c
@@ -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 );
More information about the wine-cvs
mailing list