summaryrefslogtreecommitdiffstats
path: root/cpukit/libmisc/shell/shell.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-05-27 16:43:24 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-05-27 16:43:24 +0000
commit7c4cdeb9ea24e3c019b1e0abb00af44d3884b956 (patch)
tree44d0737dc372ebcb8b259afb11bd2ab1a7eb1fe2 /cpukit/libmisc/shell/shell.c
parentFormat. (diff)
downloadrtems-7c4cdeb9ea24e3c019b1e0abb00af44d3884b956.tar.bz2
2008-05-27 Joel Sherrill <joel.sherrill@oarcorp.com>
* libmisc/shell/shell.c: Minor change so dropping connection during login prompt results in connection still being available.
Diffstat (limited to 'cpukit/libmisc/shell/shell.c')
-rw-r--r--cpukit/libmisc/shell/shell.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/cpukit/libmisc/shell/shell.c b/cpukit/libmisc/shell/shell.c
index a857e7bfa3..6c1aff0a4b 100644
--- a/cpukit/libmisc/shell/shell.c
+++ b/cpukit/libmisc/shell/shell.c
@@ -89,7 +89,7 @@ int rtems_shell_line_editor(
)
{
unsigned int extended_key;
- char c;
+ int c;
int col;
int last_col;
int output;
@@ -796,7 +796,20 @@ rtems_boolean rtems_shell_main_loop(
result = FALSE;
break;
}
- if (input_file || !rtems_shell_login(stdin,stdout)) {
+
+ /*
+ * By using result here, we can fall to the bottom of the
+ * loop when the connection is dropped during login and
+ * keep on trucking.
+ */
+ if ( input_file ) {
+ result = TRUE;
+ } else {
+ if (rtems_shell_login(stdin,stdout)) result = FALSE;
+ else result = TRUE;
+ }
+
+ if (result) {
const char *c;
memset (cmds[0], 0, cmd_count * RTEMS_SHELL_CMD_SIZE);
if (!input_file) {