diff --git a/server/async.c b/server/async.c index ba807214389..7323047d8de 100644 --- a/server/async.c +++ b/server/async.c @@ -191,7 +191,7 @@ void async_terminate( struct async *async, unsigned int status ) data.async_io.status = status; thread_queue_apc( async->thread, &async->obj, &data ); } - else async_set_result( &async->obj, STATUS_SUCCESS, 0, 0, 0 ); + else async_set_result( &async->obj, STATUS_SUCCESS, 0 ); async_reselect( async ); if (async->queue) release_object( async ); /* so that it gets destroyed when the async is done */ @@ -300,8 +300,7 @@ static void add_async_completion( struct async_queue *queue, apc_param_t cvalue, } /* store the result of the client-side async callback */ -void async_set_result( struct object *obj, unsigned int status, apc_param_t total, - client_ptr_t apc, client_ptr_t apc_arg ) +void async_set_result( struct object *obj, unsigned int status, apc_param_t total ) { struct async *async = (struct async *)obj; @@ -329,13 +328,13 @@ void async_set_result( struct object *obj, unsigned int status, apc_param_t tota if (async->queue && !async->data.apc && async->data.apc_context) add_async_completion( async->queue, async->data.apc_context, status, total ); - if (apc) + if (async->data.apc) { apc_call_t data; memset( &data, 0, sizeof(data) ); data.type = APC_USER; - data.user.func = apc; - data.user.args[0] = apc_arg; + data.user.func = async->data.apc; + data.user.args[0] = async->data.apc_context; data.user.args[1] = async->data.iosb; data.user.args[2] = 0; thread_queue_apc( async->thread, NULL, &data ); diff --git a/server/file.h b/server/file.h index 398733c460c..94cc37ff2ed 100644 --- a/server/file.h +++ b/server/file.h @@ -178,8 +178,7 @@ extern void free_async_queue( struct async_queue *queue ); extern struct async *create_async( struct thread *thread, const async_data_t *data, struct iosb *iosb ); extern void queue_async( struct async_queue *queue, struct async *async ); extern void async_set_timeout( struct async *async, timeout_t timeout, unsigned int status ); -extern void async_set_result( struct object *obj, unsigned int status, - apc_param_t total, client_ptr_t apc, client_ptr_t apc_arg ); +extern void async_set_result( struct object *obj, unsigned int status, apc_param_t total ); extern int async_queued( struct async_queue *queue ); extern int async_waiting( struct async_queue *queue ); extern void async_terminate( struct async *async, unsigned int status ); diff --git a/server/thread.c b/server/thread.c index 67f976d33c3..10a5bf14b62 100644 --- a/server/thread.c +++ b/server/thread.c @@ -1484,8 +1484,7 @@ DECL_HANDLER(select) else if (apc->result.type == APC_ASYNC_IO) { if (apc->owner) - async_set_result( apc->owner, apc->result.async_io.status, apc->result.async_io.total, - apc->result.async_io.apc, apc->result.async_io.arg ); + async_set_result( apc->owner, apc->result.async_io.status, apc->result.async_io.total ); } wake_up( &apc->obj, 0 ); close_handle( current->process, req->prev_apc );