diff options
Diffstat (limited to 'src/server')
-rw-r--r-- | src/server/server.c | 9 | ||||
-rw-r--r-- | src/server/telnet_server.c | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/server/server.c b/src/server/server.c index b0ad834a..6e43cf7c 100644 --- a/src/server/server.c +++ b/src/server/server.c @@ -277,7 +277,9 @@ int server_loop(command_context_t *command_context) FD_SET(fileno(stdin), &read_fds); #endif - if ((retval = select(fd_max + 1, &read_fds, NULL, NULL, &tv)) == -1) + retval = select(fd_max + 1, &read_fds, NULL, NULL, &tv); + + if (retval == -1) { #ifdef _WIN32 @@ -293,7 +295,9 @@ int server_loop(command_context_t *command_context) #else if (errno == EINTR) + {
FD_ZERO(&read_fds); + }
else { ERROR("error during select: %s", strerror(errno)); @@ -309,6 +313,7 @@ int server_loop(command_context_t *command_context) /* do regular tasks after at most 100ms */ tv.tv_sec = 0; tv.tv_usec = 10000; + FD_ZERO(&read_fds); /* eCos leaves read_fds unchanged in this case! */
} for (service = services; service; service = service->next) @@ -318,7 +323,9 @@ int server_loop(command_context_t *command_context) && (FD_ISSET(service->fd, &read_fds))) { if (service->max_connections > 0) + {
add_connection(service, command_context); + } else { struct sockaddr_in sin; diff --git a/src/server/telnet_server.c b/src/server/telnet_server.c index b40daca8..899902a7 100644 --- a/src/server/telnet_server.c +++ b/src/server/telnet_server.c @@ -121,13 +121,11 @@ int telnet_target_callback_event_handler(struct target_s *target, enum target_ev switch (event) { case TARGET_EVENT_HALTED: - command_print(cmd_ctx, "Target %i halted", get_num_by_target(target)); target_arch_state(target); if (!t_con->suppress_prompt) telnet_prompt(connection); break; case TARGET_EVENT_RESUMED: - command_print(cmd_ctx, "Target %i resumed", get_num_by_target(target)); if (!t_con->suppress_prompt) telnet_prompt(connection); break; |