mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-19 19:44:35 +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
@@ -54,7 +54,7 @@ static const struct extmatch_vtable_s g_nsh_extmatch =
|
||||
* Description:
|
||||
* This interface is used to initialize the NuttShell (NSH).
|
||||
* nsh_initialize() should be called once during application start-up prior
|
||||
* to executing either nsh_consolemain() or nsh_telnetstart().
|
||||
* to executing nsh_consolemain().
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
@@ -87,4 +87,16 @@ void nsh_initialize(void)
|
||||
|
||||
boardctl(BOARDIOC_INIT, 0);
|
||||
#endif
|
||||
|
||||
#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
|
||||
*/
|
||||
|
||||
nsh_telnetstart(AF_UNSPEC);
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user