- fix duplicate log entry
git-svn-id: svn://svn.berlios.de/openocd/trunk@762 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
parent
36cb42a549
commit
97c4be68a0
|
@ -445,11 +445,15 @@ int command_run_line_internal_op(command_context_t *context, char *line, int run
|
||||||
if (*line && (line[0] == '#'))
|
if (*line && (line[0] == '#'))
|
||||||
return ERROR_OK;
|
return ERROR_OK;
|
||||||
|
|
||||||
|
if (run)
|
||||||
|
{
|
||||||
LOG_DEBUG("%s", line);
|
LOG_DEBUG("%s", line);
|
||||||
|
}
|
||||||
|
|
||||||
nwords = parse_line(line, words, sizeof(words) / sizeof(words[0]));
|
nwords = parse_line(line, words, sizeof(words) / sizeof(words[0]));
|
||||||
|
|
||||||
if (nwords > 0)
|
if (nwords > 0)
|
||||||
|
{
|
||||||
if (run)
|
if (run)
|
||||||
{
|
{
|
||||||
retval = find_and_run_command(context, context->commands, words, nwords);
|
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;
|
int t;
|
||||||
return (find_command(context, context->commands, words, nwords, 0, &t)!=NULL)?ERROR_OK:ERROR_FAIL;
|
return (find_command(context, context->commands, words, nwords, 0, &t)!=NULL)?ERROR_OK:ERROR_FAIL;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
return ERROR_INVALID_ARGUMENTS;
|
return ERROR_INVALID_ARGUMENTS;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue