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 ---
Notes: v3 -> v4: new patch v4 -> v5: adjust for previous patch change v5 -> v6: no changes v6 -> v7: no changes
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;