server: Improve APC error handling when alloc_handle fails.
Whenever alloc_handle fails, we ignored the error and dequeued the next APC. This patch makes the loop break whenever the error status changes. Note that the APC is still marked as executed although it failed. Signed-off-by: Rémi Bernon <rbernon@codeweavers.com> Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
dc9267dc1c
commit
9e581ba8c5
|
@ -1579,9 +1579,7 @@ DECL_HANDLER(select)
|
|||
|
||||
reply->timeout = select_on( &select_op, op_size, req->cookie, req->flags, req->timeout );
|
||||
|
||||
if (get_error() == STATUS_USER_APC)
|
||||
{
|
||||
for (;;)
|
||||
while (get_error() == STATUS_USER_APC)
|
||||
{
|
||||
if (!(apc = thread_dequeue_apc( current, !(req->flags & SELECT_ALERTABLE) )))
|
||||
break;
|
||||
|
@ -1600,7 +1598,6 @@ DECL_HANDLER(select)
|
|||
release_object( apc );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* queue an APC for a thread or process */
|
||||
DECL_HANDLER(queue_apc)
|
||||
|
|
Loading…
Reference in New Issue