forked from Imagelibrary/rtems
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.
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
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.
|
||||||
|
|
||||||
|
|
||||||
2008-05-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
|
2008-05-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
|
||||||
|
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ int rtems_shell_line_editor(
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
unsigned int extended_key;
|
unsigned int extended_key;
|
||||||
char c;
|
int c;
|
||||||
int col;
|
int col;
|
||||||
int last_col;
|
int last_col;
|
||||||
int output;
|
int output;
|
||||||
@@ -796,7 +796,20 @@ rtems_boolean rtems_shell_main_loop(
|
|||||||
result = FALSE;
|
result = FALSE;
|
||||||
break;
|
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;
|
const char *c;
|
||||||
memset (cmds[0], 0, cmd_count * RTEMS_SHELL_CMD_SIZE);
|
memset (cmds[0], 0, cmd_count * RTEMS_SHELL_CMD_SIZE);
|
||||||
if (!input_file) {
|
if (!input_file) {
|
||||||
|
|||||||
Reference in New Issue
Block a user