Alexandre Julliard : server: Don't return a handle for user apcs.

Alexandre Julliard julliard at winehq.org
Fri Apr 30 16:03:27 CDT 2021


Module: wine
Branch: master
Commit: 384c042feafeb82e08db895c16df3a3b4e7652dd
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=384c042feafeb82e08db895c16df3a3b4e7652dd

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri Apr 30 12:03:21 2021 +0200

server: Don't return a handle for user apcs.

Reported by David Torok.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 server/thread.c | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/server/thread.c b/server/thread.c
index 7b248f24a30..2f11d7d51c2 100644
--- a/server/thread.c
+++ b/server/thread.c
@@ -1639,21 +1639,13 @@ DECL_HANDLER(select)
 
     select_on( &select_op, op_size, req->cookie, req->flags, req->timeout );
 
-    while (get_error() == STATUS_USER_APC)
+    if (get_error() == STATUS_USER_APC)
     {
         apc = thread_dequeue_apc( current, 0 );
-        if ((reply->apc_handle = alloc_handle( current->process, apc, SYNCHRONIZE, 0 )))
-        {
-            reply->call = apc->call;
-            release_object( apc );
-            break;
-        }
-        apc->executed = 1;
-        wake_up( &apc->obj, 0 );
+        reply->call = apc->call;
         release_object( apc );
     }
-
-    if (get_error() == STATUS_KERNEL_APC)
+    else if (get_error() == STATUS_KERNEL_APC)
     {
         apc = thread_dequeue_apc( current, 1 );
         if ((reply->apc_handle = alloc_handle( current->process, apc, SYNCHRONIZE, 0 )))




More information about the wine-cvs mailing list