From: Øyvind H. <go...@us...> - 2010-05-18 12:48:01
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via c86d7bdad4418f4fc3d81a68398187c6480316fa (commit) from e804a34a632345effd706872605a0cc382a4da70 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit c86d7bdad4418f4fc3d81a68398187c6480316fa Author: Ãyvind Harboe <oyv...@zy...> Date: Tue May 18 12:34:12 2010 +0200 jim: fix bug in tcl "puts" tcl "puts" didn't work because the logging code sensored strings that did not include a '\n'. The correct thing is to sensor empty strings, which are used to keep gdb connection alive. The tcl "puts" code broke apart strings which do contain '\n' in order to implement the -nonewline argument, which is how it got hurt by the bug in log.c Signed-off-by: Ãyvind Harboe <oyv...@zy...> diff --git a/src/helper/log.c b/src/helper/log.c index 7ace930..da227bd 100644 --- a/src/helper/log.c +++ b/src/helper/log.c @@ -139,7 +139,7 @@ static void log_puts(enum log_levels level, const char *file, int line, const ch if (f != NULL) file = f + 1; - if (strchr(string, '\n') != NULL) + if (strlen(string) > 0) { if (debug_level >= LOG_LVL_DEBUG) { @@ -163,17 +163,12 @@ static void log_puts(enum log_levels level, const char *file, int line, const ch { /* if we are using gdb through pipes then we do not want any output * to the pipe otherwise we get repeated strings */ - if (strcmp(string, "\n") != 0) - { - /* print human readable output - but skip empty lines */ - fprintf(log_output, "%s%s", - (level > LOG_LVL_USER)?log_strings[level + 1]:"", string); - } + fprintf(log_output, "%s%s", + (level > LOG_LVL_USER)?log_strings[level + 1]:"", string); } } else { - /* only entire lines are logged. Otherwise it's - * single chars intended for the log callbacks. */ + /* Empty strings are sent to log callbacks to keep e.g. gdbserver alive, here we do nothing. */ } fflush(log_output); ----------------------------------------------------------------------- Summary of changes: src/helper/log.c | 13 ++++--------- 1 files changed, 4 insertions(+), 9 deletions(-) hooks/post-receive -- Main OpenOCD repository |