Commit a5b6e90d authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

server: Don't change the status of an already terminated async.

parent 9561af9a
......@@ -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))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment