mirror of
https://github.com/ep00ch/lwip-contrib-mac.git
synced 2024-06-12 01:29:28 +00:00
Fixed invalid assertion in error()
This commit is contained in:
parent
e4ad203b0b
commit
64763950ca
|
@ -1354,7 +1354,7 @@ parse_command(struct command *com, u32_t len)
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------------------*/
|
||||||
static void
|
static void
|
||||||
error(s8_t err, struct netconn *conn)
|
shell_error(s8_t err, struct netconn *conn)
|
||||||
{
|
{
|
||||||
switch (err) {
|
switch (err) {
|
||||||
case ESYNTAX:
|
case ESYNTAX:
|
||||||
|
@ -1366,6 +1366,9 @@ error(s8_t err, struct netconn *conn)
|
||||||
case ETOOMANY:
|
case ETOOMANY:
|
||||||
sendstr("## Too many arguments to command given"NEWLINE, conn);
|
sendstr("## Too many arguments to command given"NEWLINE, conn);
|
||||||
break;
|
break;
|
||||||
|
case ECLOSED:
|
||||||
|
sendstr("## Connection closed"NEWLINE, conn);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
LWIP_ASSERT("Unknown error", 0);
|
LWIP_ASSERT("Unknown error", 0);
|
||||||
break;
|
break;
|
||||||
|
@ -1415,14 +1418,14 @@ shell_main(struct netconn *conn)
|
||||||
com.conn = conn;
|
com.conn = conn;
|
||||||
err = com.exec(&com);
|
err = com.exec(&com);
|
||||||
}
|
}
|
||||||
if (err != ESUCCESS) {
|
|
||||||
error(err, conn);
|
|
||||||
}
|
|
||||||
if (err == ECLOSED) {
|
if (err == ECLOSED) {
|
||||||
printf("Closed"NEWLINE);
|
printf("Closed"NEWLINE);
|
||||||
error(err, conn);
|
shell_error(err, conn);
|
||||||
goto close;
|
goto close;
|
||||||
}
|
}
|
||||||
|
if (err != ESUCCESS) {
|
||||||
|
shell_error(err, conn);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
sendstr(NEWLINE NEWLINE
|
sendstr(NEWLINE NEWLINE
|
||||||
"lwIP simple interactive shell."NEWLINE
|
"lwIP simple interactive shell."NEWLINE
|
||||||
|
|
Loading…
Reference in New Issue
Block a user