summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorntfreak <ntfreak@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-07-06 23:49:05 +0000
committerntfreak <ntfreak@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-07-06 23:49:05 +0000
commit97c4be68a05d8ac42a79f0311b4ee4f5aab9dc62 (patch)
tree3cc604f1d882739f66e7dc15df22fc22646cd06b /src
parent36cb42a549bf579d106079ded17dcdf59424acf4 (diff)
downloadopenocd_libswd-97c4be68a05d8ac42a79f0311b4ee4f5aab9dc62.tar.gz
openocd_libswd-97c4be68a05d8ac42a79f0311b4ee4f5aab9dc62.tar.bz2
openocd_libswd-97c4be68a05d8ac42a79f0311b4ee4f5aab9dc62.tar.xz
openocd_libswd-97c4be68a05d8ac42a79f0311b4ee4f5aab9dc62.zip
- fix duplicate log entry
git-svn-id: svn://svn.berlios.de/openocd/trunk@762 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src')
-rw-r--r--src/helper/command.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/helper/command.c b/src/helper/command.c
index 8b7be702..e30e2d38 100644
--- a/src/helper/command.c
+++ b/src/helper/command.c
@@ -445,11 +445,15 @@ int command_run_line_internal_op(command_context_t *context, char *line, int run
if (*line && (line[0] == '#'))
return ERROR_OK;
- LOG_DEBUG("%s", line);
+ if (run)
+ {
+ LOG_DEBUG("%s", line);
+ }
nwords = parse_line(line, words, sizeof(words) / sizeof(words[0]));
if (nwords > 0)
+ {
if (run)
{
retval = find_and_run_command(context, context->commands, words, nwords);
@@ -458,6 +462,7 @@ int command_run_line_internal_op(command_context_t *context, char *line, int run
int t;
return (find_command(context, context->commands, words, nwords, 0, &t)!=NULL)?ERROR_OK:ERROR_FAIL;
}
+ }
else
return ERROR_INVALID_ARGUMENTS;