Jinoh Kang : server: Ensure initial status is set in async_set_result().
Module: wine Branch: master Commit: d162a3e2f19b152de1cb132f4b68835b60a63e14 URL: https://source.winehq.org/git/wine.git/?a=commit;h=d162a3e2f19b152de1cb132f4... Author: Jinoh Kang <jinoh.kang.kr(a)gmail.com> Date: Sun Mar 20 07:28:05 2022 +0900 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(a)gmail.com> Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- server/async.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/async.c b/server/async.c index 6d663a6a553..d49fb8b7c04 100644 --- a/server/async.c +++ b/server/async.c @@ -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;
participants (1)
-
Alexandre Julliard