From b3422b33fdf1fa8dc223b06f7de68c88cce15b3b Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 9 May 2016 21:25:37 +0200 Subject: [PATCH] Add parameter to command_new --- command.c | 5 ++++- command.h | 2 +- input/input_driver.c | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/command.c b/command.c index ac47a77451..75ba4abfda 100644 --- a/command.c +++ b/command.c @@ -87,6 +87,7 @@ struct command { + bool local_enable; #ifdef HAVE_STDIN_CMD bool stdin_enable; char stdin_buf[STDIN_BUF_SIZE]; @@ -249,12 +250,14 @@ static bool command_stdin_init(command_t *handle) } #endif -command_t *command_new(void) +command_t *command_new(bool local_enable) { command_t *handle = (command_t*)calloc(1, sizeof(*handle)); if (!handle) return NULL; + handle->local_enable = local_enable; + return handle; } diff --git a/command.h b/command.h index efdab9d4d0..92dd882916 100644 --- a/command.h +++ b/command.h @@ -233,7 +233,7 @@ bool command_network_new( bool network_enable, uint16_t port); -command_t *command_new(void); +command_t *command_new(bool local_enable); bool command_poll(command_t *handle); diff --git a/input/input_driver.c b/input/input_driver.c index b02e7d1679..593387de3a 100644 --- a/input/input_driver.c +++ b/input/input_driver.c @@ -850,7 +850,7 @@ bool input_driver_init_command(void) "Cannot use this command interface.\n"); } - input_driver_command = command_new(); + input_driver_command = command_new(false); if (!command_network_new( input_driver_command,