From 3d31e52fe7bbfbfe28af6dd224bb7594bbcd9521 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Wed, 16 Sep 2020 20:39:54 +0200 Subject: [PATCH] server: Remove no longer used attach_console request. Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- include/wine/server_protocol.h | 17 +---------------- server/console.c | 29 ----------------------------- server/protocol.def | 6 ------ server/request.h | 4 ---- server/trace.c | 8 -------- 5 files changed, 1 insertion(+), 63 deletions(-) diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h index 5259b5a60ce..2d4e0164783 100644 --- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h @@ -1850,18 +1850,6 @@ struct free_console_reply -struct attach_console_request -{ - struct request_header __header; - process_id_t pid; -}; -struct attach_console_reply -{ - struct reply_header __header; -}; - - - struct get_console_wait_event_request { struct request_header __header; @@ -5522,7 +5510,6 @@ enum request REQ_set_socket_deferred, REQ_alloc_console, REQ_free_console, - REQ_attach_console, REQ_get_console_wait_event, REQ_append_console_input_history, REQ_get_console_input_history, @@ -5811,7 +5798,6 @@ union generic_request struct set_socket_deferred_request set_socket_deferred_request; struct alloc_console_request alloc_console_request; struct free_console_request free_console_request; - struct attach_console_request attach_console_request; struct get_console_wait_event_request get_console_wait_event_request; struct append_console_input_history_request append_console_input_history_request; struct get_console_input_history_request get_console_input_history_request; @@ -6098,7 +6084,6 @@ union generic_reply struct set_socket_deferred_reply set_socket_deferred_reply; struct alloc_console_reply alloc_console_reply; struct free_console_reply free_console_reply; - struct attach_console_reply attach_console_reply; struct get_console_wait_event_reply get_console_wait_event_reply; struct append_console_input_history_reply append_console_input_history_reply; struct get_console_input_history_reply get_console_input_history_reply; @@ -6320,7 +6305,7 @@ union generic_reply /* ### protocol_version begin ### */ -#define SERVER_PROTOCOL_VERSION 641 +#define SERVER_PROTOCOL_VERSION 642 /* ### protocol_version end ### */ diff --git a/server/console.c b/server/console.c index 5346c7cb8f1..a946abacbb3 100644 --- a/server/console.c +++ b/server/console.c @@ -2565,35 +2565,6 @@ DECL_HANDLER(free_console) free_console( current->process ); } -/* attach to a other process's console */ -DECL_HANDLER(attach_console) -{ - struct process *process; - - if (current->process->console) - { - set_error( STATUS_ACCESS_DENIED ); - return; - } - - process = get_process_from_id( req->pid == ATTACH_PARENT_PROCESS - ? current->process->parent_id : req->pid ); - if (!process) return; - - if (process->console && process->console->active) - { - current->process->console = (struct console_input *)grab_object( process->console ); - current->process->console->num_proc++; - } - else - { - set_error( STATUS_INVALID_HANDLE ); - } - - release_object( process ); - return; -} - /* appends a string to console's history */ DECL_HANDLER(append_console_input_history) { diff --git a/server/protocol.def b/server/protocol.def index 92290af701c..fd9b721d693 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -1472,12 +1472,6 @@ enum server_fd_type @END -/* Attach to a other process's console */ -@REQ(attach_console) - process_id_t pid; /* pid of attached console process */ -@END - - /* Get the input queue wait event */ @REQ(get_console_wait_event) obj_handle_t handle; /* handle to the console */ diff --git a/server/request.h b/server/request.h index db7215bd438..39f3ce7b2ef 100644 --- a/server/request.h +++ b/server/request.h @@ -183,7 +183,6 @@ DECL_HANDLER(enable_socket_event); DECL_HANDLER(set_socket_deferred); DECL_HANDLER(alloc_console); DECL_HANDLER(free_console); -DECL_HANDLER(attach_console); DECL_HANDLER(get_console_wait_event); DECL_HANDLER(append_console_input_history); DECL_HANDLER(get_console_input_history); @@ -471,7 +470,6 @@ static const req_handler req_handlers[REQ_NB_REQUESTS] = (req_handler)req_set_socket_deferred, (req_handler)req_alloc_console, (req_handler)req_free_console, - (req_handler)req_attach_console, (req_handler)req_get_console_wait_event, (req_handler)req_append_console_input_history, (req_handler)req_get_console_input_history, @@ -1108,8 +1106,6 @@ C_ASSERT( sizeof(struct alloc_console_request) == 32 ); C_ASSERT( FIELD_OFFSET(struct alloc_console_reply, handle_in) == 8 ); C_ASSERT( sizeof(struct alloc_console_reply) == 16 ); C_ASSERT( sizeof(struct free_console_request) == 16 ); -C_ASSERT( FIELD_OFFSET(struct attach_console_request, pid) == 12 ); -C_ASSERT( sizeof(struct attach_console_request) == 16 ); C_ASSERT( FIELD_OFFSET(struct get_console_wait_event_request, handle) == 12 ); C_ASSERT( sizeof(struct get_console_wait_event_request) == 16 ); C_ASSERT( FIELD_OFFSET(struct get_console_wait_event_reply, event) == 8 ); diff --git a/server/trace.c b/server/trace.c index 990515d6356..91e3208c497 100644 --- a/server/trace.c +++ b/server/trace.c @@ -2044,11 +2044,6 @@ static void dump_free_console_request( const struct free_console_request *req ) { } -static void dump_attach_console_request( const struct attach_console_request *req ) -{ - fprintf( stderr, " pid=%04x", req->pid ); -} - static void dump_get_console_wait_event_request( const struct get_console_wait_event_request *req ) { fprintf( stderr, " handle=%04x", req->handle ); @@ -4493,7 +4488,6 @@ static const dump_func req_dumpers[REQ_NB_REQUESTS] = { (dump_func)dump_set_socket_deferred_request, (dump_func)dump_alloc_console_request, (dump_func)dump_free_console_request, - (dump_func)dump_attach_console_request, (dump_func)dump_get_console_wait_event_request, (dump_func)dump_append_console_input_history_request, (dump_func)dump_get_console_input_history_request, @@ -4778,7 +4772,6 @@ static const dump_func reply_dumpers[REQ_NB_REQUESTS] = { NULL, (dump_func)dump_alloc_console_reply, NULL, - NULL, (dump_func)dump_get_console_wait_event_reply, NULL, (dump_func)dump_get_console_input_history_reply, @@ -5063,7 +5056,6 @@ static const char * const req_names[REQ_NB_REQUESTS] = { "set_socket_deferred", "alloc_console", "free_console", - "attach_console", "get_console_wait_event", "append_console_input_history", "get_console_input_history",