Add parameter to command_new
This commit is contained in:
parent
f15f28ce02
commit
b3422b33fd
|
@ -87,6 +87,7 @@
|
||||||
|
|
||||||
struct command
|
struct command
|
||||||
{
|
{
|
||||||
|
bool local_enable;
|
||||||
#ifdef HAVE_STDIN_CMD
|
#ifdef HAVE_STDIN_CMD
|
||||||
bool stdin_enable;
|
bool stdin_enable;
|
||||||
char stdin_buf[STDIN_BUF_SIZE];
|
char stdin_buf[STDIN_BUF_SIZE];
|
||||||
|
@ -249,12 +250,14 @@ static bool command_stdin_init(command_t *handle)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
command_t *command_new(void)
|
command_t *command_new(bool local_enable)
|
||||||
{
|
{
|
||||||
command_t *handle = (command_t*)calloc(1, sizeof(*handle));
|
command_t *handle = (command_t*)calloc(1, sizeof(*handle));
|
||||||
if (!handle)
|
if (!handle)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
handle->local_enable = local_enable;
|
||||||
|
|
||||||
return handle;
|
return handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -233,7 +233,7 @@ bool command_network_new(
|
||||||
bool network_enable,
|
bool network_enable,
|
||||||
uint16_t port);
|
uint16_t port);
|
||||||
|
|
||||||
command_t *command_new(void);
|
command_t *command_new(bool local_enable);
|
||||||
|
|
||||||
bool command_poll(command_t *handle);
|
bool command_poll(command_t *handle);
|
||||||
|
|
||||||
|
|
|
@ -850,7 +850,7 @@ bool input_driver_init_command(void)
|
||||||
"Cannot use this command interface.\n");
|
"Cannot use this command interface.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
input_driver_command = command_new();
|
input_driver_command = command_new(false);
|
||||||
|
|
||||||
if (!command_network_new(
|
if (!command_network_new(
|
||||||
input_driver_command,
|
input_driver_command,
|
||||||
|
|
Loading…
Reference in New Issue