server: Ensure initial status is set in async_set_result().

Shift the resposibility of setting initial status from
set_async_direct_result request handler to async_set_result().

Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jinoh Kang 2022-03-20 07:28:05 +09:00 committed by Alexandre Julliard
parent b632ddedcd
commit d162a3e2f1
1 changed files with 2 additions and 2 deletions

View File

@ -481,6 +481,8 @@ void async_set_result( struct object *obj, unsigned int status, apc_param_t tota
assert( async->terminated ); /* it must have been woken up if we get a result */
if (async->unknown_status) async_set_initial_status( async, status );
if (async->alerted && status == STATUS_PENDING) /* restart it */
{
async->terminated = 0;
@ -765,8 +767,6 @@ DECL_HANDLER(set_async_direct_result)
return;
}
async_set_initial_status( async, status );
if (status == STATUS_PENDING)
{
async->direct_result = 0;