server: Remove support for crating renderer in alloc_console request.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2020-07-16 17:50:42 +02:00 committed by Alexandre Julliard
parent 919a94aa95
commit 9415667cdf
1 changed files with 9 additions and 25 deletions

View File

@ -430,7 +430,7 @@ static struct object *create_console_input_events(void)
return &evt->obj; return &evt->obj;
} }
static struct object *create_console_input( struct thread* renderer, int fd ) static struct object *create_console_input( int fd )
{ {
struct console_input *console_input; struct console_input *console_input;
@ -439,7 +439,7 @@ static struct object *create_console_input( struct thread* renderer, int fd )
if (fd != -1) close( fd ); if (fd != -1) close( fd );
return NULL; return NULL;
} }
console_input->renderer = renderer; console_input->renderer = NULL;
console_input->mode = ENABLE_PROCESSED_INPUT | ENABLE_LINE_INPUT | console_input->mode = ENABLE_PROCESSED_INPUT | ENABLE_LINE_INPUT |
ENABLE_ECHO_INPUT | ENABLE_MOUSE_INPUT | ENABLE_INSERT_MODE | ENABLE_ECHO_INPUT | ENABLE_MOUSE_INPUT | ENABLE_INSERT_MODE |
ENABLE_EXTENDED_FLAGS; ENABLE_EXTENDED_FLAGS;
@ -447,7 +447,7 @@ static struct object *create_console_input( struct thread* renderer, int fd )
console_input->active = NULL; console_input->active = NULL;
console_input->recnum = 0; console_input->recnum = 0;
console_input->records = NULL; console_input->records = NULL;
console_input->evt = renderer ? (struct console_input_events *)create_console_input_events() : NULL; console_input->evt = NULL;
console_input->title = NULL; console_input->title = NULL;
console_input->title_len = 0; console_input->title_len = 0;
console_input->history_size = 50; console_input->history_size = 50;
@ -462,7 +462,7 @@ static struct object *create_console_input( struct thread* renderer, int fd )
console_input->fd = NULL; console_input->fd = NULL;
init_async_queue( &console_input->read_q ); init_async_queue( &console_input->read_q );
if (!console_input->history || (renderer && !console_input->evt) || !console_input->event) if (!console_input->history || !console_input->event)
{ {
if (fd != -1) close( fd ); if (fd != -1) close( fd );
console_input->history_size = 0; console_input->history_size = 0;
@ -1844,8 +1844,6 @@ struct object *create_console_device( struct object *root, const struct unicode_
/* allocate a console for the renderer */ /* allocate a console for the renderer */
DECL_HANDLER(alloc_console) DECL_HANDLER(alloc_console)
{ {
obj_handle_t in = 0;
obj_handle_t evt = 0;
struct process *process; struct process *process;
struct console_input *console; struct console_input *console;
int fd; int fd;
@ -1892,31 +1890,17 @@ DECL_HANDLER(alloc_console)
{ {
if (fd != -1) close( fd ); if (fd != -1) close( fd );
set_error( STATUS_ACCESS_DENIED ); set_error( STATUS_ACCESS_DENIED );
goto the_end;
} }
else if ((console = (struct console_input*)create_console_input( fd )))
if ((console = (struct console_input*)create_console_input( NULL, fd )))
{ {
if ((in = alloc_handle( current->process, console, req->access, req->attributes ))) if ((reply->handle_in = alloc_handle( current->process, console, req->access,
{ req->attributes )) && attach)
if (!console->evt ||
(evt = alloc_handle( current->process, console->evt, SYNCHRONIZE|GENERIC_READ|GENERIC_WRITE, 0 )))
{
if (attach)
{ {
process->console = (struct console_input*)grab_object( console ); process->console = (struct console_input*)grab_object( console );
console->num_proc++; console->num_proc++;
} }
reply->handle_in = in;
reply->event = evt;
release_object( console );
goto the_end;
}
close_handle( current->process, in );
}
release_object( console ); release_object( console );
} }
the_end:
release_object( process ); release_object( process );
} }