X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fserver%2Ftelnet_server.h;h=27148d7ceeaee357c8f2af0b445206f65dc72c66;hb=c8c20b7c0bfbc802faf46598ac585707be99d153;hp=04ba965708c49f85d5ab658fc3c60e22cf187af8;hpb=d4b7cbff88bb5eb14fececdbd8e2a0b3e58ce6e0;p=openocd diff --git a/src/server/telnet_server.h b/src/server/telnet_server.h index 04ba9657..27148d7c 100644 --- a/src/server/telnet_server.h +++ b/src/server/telnet_server.h @@ -27,11 +27,10 @@ #include -#define TELNET_BUFFER_SIZE (1024) +#define TELNET_BUFFER_SIZE (10*1024) -#define TELNET_OPTION_MAX_SIZE (128) #define TELNET_LINE_HISTORY_SIZE (128) -#define TELNET_LINE_MAX_SIZE (256) +#define TELNET_LINE_MAX_SIZE (10*256) enum telnet_states { TELNET_STATE_DATA, @@ -47,17 +46,16 @@ enum telnet_states { struct telnet_connection { char *prompt; + bool prompt_visible; enum telnet_states state; char line[TELNET_LINE_MAX_SIZE]; - int line_size; - int line_cursor; - char option[TELNET_OPTION_MAX_SIZE]; - int option_size; + size_t line_size; + size_t line_cursor; char last_escape; char *history[TELNET_LINE_HISTORY_SIZE]; - int next_history; - int current_history; - int closed; + size_t next_history; + size_t current_history; + bool closed; }; struct telnet_service { @@ -66,5 +64,6 @@ struct telnet_service { int telnet_init(char *banner); int telnet_register_commands(struct command_context *command_context); +void telnet_service_free(void); #endif /* OPENOCD_SERVER_TELNET_SERVER_H */