mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-20 12:55:43 +08:00
nshlib: Call nsh_telnetstart in nsh_initialize to avoid the dupliation
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:

committed by
hartmannathan

parent
cf70d8f95b
commit
964747dd36
@@ -127,27 +127,6 @@ int main(int argc, FAR char *argv[])
|
||||
|
||||
nsh_initialize();
|
||||
|
||||
#if defined(CONFIG_NSH_TELNET) && !defined(CONFIG_NSH_DISABLE_TELNETSTART) && \
|
||||
!defined(CONFIG_NETINIT_NETLOCAL)
|
||||
/* If the Telnet console is selected as a front-end, then start the
|
||||
* Telnet daemon UNLESS network initialization is deferred via
|
||||
* CONFIG_NETINIT_NETLOCAL. In that case, the telnet daemon must be
|
||||
* started manually with the telnetd command after the network has
|
||||
* been initialized
|
||||
*/
|
||||
|
||||
ret = nsh_telnetstart(AF_UNSPEC);
|
||||
if (ret < 0)
|
||||
{
|
||||
/* The daemon is NOT running. Report the error then fail...
|
||||
* either with the serial console up or just exiting.
|
||||
*/
|
||||
|
||||
fprintf(stderr, "ERROR: Failed to start TELNET daemon: %d\n", ret);
|
||||
exitval = 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_NSH_CONSOLE
|
||||
/* If the serial console front end is selected, run it on this thread */
|
||||
|
||||
|
Reference in New Issue
Block a user