nshlib: Reuse nsh_session logic in nsh_telnetmain

to avoid the code duplication

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2022-10-17 05:17:41 +08:00
committed by Alan Carvalho de Assis
parent 8e460e7e19
commit 75455d3788
8 changed files with 55 additions and 128 deletions

View File

@@ -273,7 +273,7 @@ int nsh_consolemain(int argc, FAR char *argv[])
/* Execute the session */
nsh_session(pstate, true, argc, argv);
nsh_session(pstate, NSH_LOGIN_LOCAL, argc, argv);
/* We lost the connection. Wait for the keyboard to
* be re-connected.