diff options
author | Zachary T Welch <zw@superlucidity.net> | 2009-11-09 21:22:48 -0800 |
---|---|---|
committer | Zachary T Welch <zw@superlucidity.net> | 2009-11-09 21:39:46 -0800 |
commit | 23d88e57748bece953ddf1063017152243abc93a (patch) | |
tree | 557e931ffe80ce50b8a97e6bebac42e49e6955a8 /src/server/telnet_server.c | |
parent | 8d6dcb9d39f0f948ef44beff991337b830fc4567 (diff) | |
download | riscv-openocd-23d88e57748bece953ddf1063017152243abc93a.zip riscv-openocd-23d88e57748bece953ddf1063017152243abc93a.tar.gz riscv-openocd-23d88e57748bece953ddf1063017152243abc93a.tar.bz2 |
server: remove useless declarations
Remove server command declarations, make handler routines static.
Diffstat (limited to 'src/server/telnet_server.c')
-rw-r--r-- | src/server/telnet_server.c | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/src/server/telnet_server.c b/src/server/telnet_server.c index c9c60bb..84959e3 100644 --- a/src/server/telnet_server.c +++ b/src/server/telnet_server.c @@ -32,9 +32,6 @@ static unsigned short telnet_port = 4444; -int handle_exit_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); -int handle_telnet_port_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); - static char *negotiate = "\xFF\xFB\x03" /* IAC WILL Suppress Go Ahead */ "\xFF\xFB\x01" /* IAC WILL Echo */ @@ -608,24 +605,30 @@ int telnet_init(char *banner) return ERROR_OK; } -int telnet_register_commands(command_context_t *command_context) -{ - register_command(command_context, NULL, "exit", handle_exit_command, - COMMAND_EXEC, "exit telnet session"); - - register_command(command_context, NULL, "telnet_port", handle_telnet_port_command, - COMMAND_ANY, "port on which to listen for incoming telnet connections"); - - return ERROR_OK; -} - /* daemon configuration command telnet_port */ -int handle_telnet_port_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc) +static int handle_telnet_port_command(struct command_context_s *cmd_ctx, + char *cmd, char **args, int argc) { return server_port_command(cmd_ctx, cmd, args, argc, &telnet_port); } -int handle_exit_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc) +static int handle_exit_command(struct command_context_s *cmd_ctx, + char *cmd, char **args, int argc) { return ERROR_COMMAND_CLOSE_CONNECTION; } + +int telnet_register_commands(command_context_t *command_context) +{ + register_command(command_context, NULL, "exit", + &handle_exit_command, COMMAND_EXEC, + "exit telnet session"); + + register_command(command_context, NULL, "telnet_port", + &handle_telnet_port_command, COMMAND_ANY, + "port on which to listen for incoming telnet connections"); + + return ERROR_OK; +} + + |