]> git.sur5r.net Git - openocd/commitdiff
- remove error message on shutdown
authorntfreak <ntfreak@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Wed, 21 May 2008 19:23:35 +0000 (19:23 +0000)
committerntfreak <ntfreak@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Wed, 21 May 2008 19:23:35 +0000 (19:23 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@672 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/helper/command.c
src/server/server.c

index 0a120b102a4be492a918597dcc07b8d82084eba4..3cf531b7e6f6240b3b6b6a020b6f39c64c3d2cec 100644 (file)
@@ -374,7 +374,12 @@ int find_and_run_command(command_context_t *context, command_t *commands, char *
                                        {
                                                command_print(context, "Syntax error:");
                                                command_print_help_line(context, c, 0);
-                                       } else if (retval != ERROR_OK)
+                                       }
+                                       else if (retval == ERROR_COMMAND_CLOSE_CONNECTION)
+                                       {
+                                               /* just fall through for a shutdown request */
+                                       }
+                                       else if (retval != ERROR_OK)
                                        {
                                                /* we do not print out an error message because the command *should*
                                                 * have printed out an error
@@ -558,7 +563,6 @@ int command_print_help(command_context_t* context, char* name, char** args, int
     return command_print_help_match(context, context->commands, name, args, argc);
 }
 
-
 void command_set_output_handler(command_context_t* context, int (*output_handler)(struct command_context_s *context, char* line), void *priv)
 {
        context->output_handler = output_handler;
index 21a8ebabaa1827e06f3356041cd713348e185981..fb003624e6507d9fdaa2f1c97fab13edc0aa3b36 100644 (file)
@@ -462,7 +462,6 @@ int server_init()
        signal(SIGBREAK, sig_handler);
        signal(SIGABRT, sig_handler);
 #endif
-
        
        return ERROR_OK;
 }
@@ -494,5 +493,3 @@ int handle_shutdown_command(struct command_context_s *cmd_ctx, char *cmd, char *
 
        return ERROR_COMMAND_CLOSE_CONNECTION;
 }
-
-