summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-03-07 10:53:50 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-03-07 10:53:50 +0000
commitc317ffe2435236754a80c856dee688cb09ac425e (patch)
treeae8710e94a395aa0cda7e7a7532b65f233d78911
parente66f9aaba94e232f87c725f2fce98cfb3f92679f (diff)
downloadopenocd+libswd-c317ffe2435236754a80c856dee688cb09ac425e.tar.gz
openocd+libswd-c317ffe2435236754a80c856dee688cb09ac425e.tar.bz2
openocd+libswd-c317ffe2435236754a80c856dee688cb09ac425e.tar.xz
openocd+libswd-c317ffe2435236754a80c856dee688cb09ac425e.zip
Removed code that inserted prompt after printing asynchronous information. Current implementation was broken beyond repair.
git-svn-id: svn://svn.berlios.de/openocd/trunk@463 b42882b7-edfa-0310-969c-e2dbd0fdcd60
-rw-r--r--src/server/telnet_server.c13
-rw-r--r--src/server/telnet_server.h1
2 files changed, 0 insertions, 14 deletions
diff --git a/src/server/telnet_server.c b/src/server/telnet_server.c
index 892ed729..38213f80 100644
--- a/src/server/telnet_server.c
+++ b/src/server/telnet_server.c
@@ -119,20 +119,10 @@ void telnet_log_callback(void *priv, const char *file, int line,
int telnet_target_callback_event_handler(struct target_s *target, enum target_event event, void *priv)
{
- struct command_context_s *cmd_ctx = priv;
- connection_t *connection = cmd_ctx->output_handler_priv;
- telnet_connection_t *t_con = connection->priv;
-
switch (event)
{
case TARGET_EVENT_HALTED:
target_arch_state(target);
- if (!t_con->suppress_prompt)
- telnet_prompt(connection);
- break;
- case TARGET_EVENT_RESUMED:
- if (!t_con->suppress_prompt)
- telnet_prompt(connection);
break;
default:
break;
@@ -155,7 +145,6 @@ int telnet_new_connection(connection_t *connection)
telnet_connection->line_cursor = 0;
telnet_connection->option_size = 0;
telnet_connection->prompt = strdup("> ");
- telnet_connection->suppress_prompt = 0;
telnet_connection->state = TELNET_STATE_DATA;
/* output goes through telnet connection */
@@ -298,12 +287,10 @@ int telnet_input(connection_t *connection)
}
log_add_callback(telnet_log_callback, connection);
- t_con->suppress_prompt = 1;
retval = command_run_line(command_context, t_con->line);
log_remove_callback(telnet_log_callback, connection);
- t_con->suppress_prompt = 0;
if (retval == ERROR_COMMAND_CLOSE_CONNECTION)
{
diff --git a/src/server/telnet_server.h b/src/server/telnet_server.h
index 17e60726..83579f9d 100644
--- a/src/server/telnet_server.h
+++ b/src/server/telnet_server.h
@@ -44,7 +44,6 @@ enum telnet_states
typedef struct telnet_connection_s
{
char *prompt;
- int suppress_prompt;
enum telnet_states state;
char line[TELNET_LINE_MAX_SIZE];
int line_size;