Zebediah Figura : server: Don't change the status of an already terminated async.
Module: wine Branch: master Commit: a5b6e90d48eb2f1a82cbab4b2a7864a312b8c78a URL: https://source.winehq.org/git/wine.git/?a=commit;h=a5b6e90d48eb2f1a82cbab4b2... Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Fri May 21 22:08:45 2021 -0500 server: Don't change the status of an already terminated async. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- server/async.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/server/async.c b/server/async.c index 1ac5117edb9..a5fa61dc6e5 100644 --- a/server/async.c +++ b/server/async.c @@ -154,12 +154,7 @@ void async_terminate( struct async *async, unsigned int status ) { assert( status != STATUS_PENDING ); - if (async->status != STATUS_PENDING) - { - /* already terminated, just update status */ - async->status = status; - return; - } + if (async->status != STATUS_PENDING) return; /* already terminated */ async->status = status; if (async->iosb && async->iosb->status == STATUS_PENDING) async->iosb->status = status; @@ -457,7 +452,7 @@ static int cancel_async( struct process *process, struct object *obj, struct thr restart: LIST_FOR_EACH_ENTRY( async, &process->asyncs, struct async, process_entry ) { - if (async->status == STATUS_CANCELLED) continue; + if (async->status != STATUS_PENDING) continue; if ((!obj || (async->fd && get_fd_user( async->fd ) == obj)) && (!thread || async->thread == thread) && (!iosb || async->data.iosb == iosb))
participants (1)
-
Alexandre Julliard