Jacek Caban : server: Implement disconnecting message queue.
Module: wine Branch: master Commit: 2fad531cb5441d833842f5fe16bc13097b3a403f URL: http://source.winehq.org/git/wine.git/?a=commit;h=2fad531cb5441d833842f5fe16... Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Mar 21 13:03:12 2017 +0100 server: Implement disconnecting message queue. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- server/named_pipe.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/server/named_pipe.c b/server/named_pipe.c index 044bc97..6dc032d 100644 --- a/server/named_pipe.c +++ b/server/named_pipe.c @@ -401,6 +401,21 @@ static void pipe_end_disconnect( struct pipe_end *pipe_end, unsigned int status pipe_end->connection = NULL; + if (use_server_io( pipe_end )) + { + struct pipe_message *message, *next; + struct async *async; + if (pipe_end->fd) fd_async_wake_up( pipe_end->fd, ASYNC_TYPE_WAIT, status ); + LIST_FOR_EACH_ENTRY_SAFE( message, next, &pipe_end->message_queue, struct pipe_message, entry ) + { + async = message->async; + if (async || status == STATUS_PIPE_DISCONNECTED) free_message( message ); + if (!async) continue; + async_terminate( async, status ); + release_object( async ); + } + if (status == STATUS_PIPE_DISCONNECTED) set_fd_signaled( pipe_end->fd, 0 ); + } if (connection) { connection->connection = NULL;
participants (1)
-
Alexandre Julliard