[PATCH 1/5] server: Don't change the status of an already terminated async.
Zebediah Figura
z.figura12 at gmail.com
Fri May 21 22:08:45 CDT 2021
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
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))
--
2.30.2
More information about the wine-devel
mailing list