You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/05/07 02:14:53 UTC

[incubator-nuttx-apps] branch master updated: nsh/telnetd: bringup the network before telnetd init

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new a5337af  nsh/telnetd: bringup the network before telnetd init
a5337af is described below

commit a5337af48478865e1e7b4d3aef6adb1895ede7b9
Author: chao.an <an...@xiaomi.com>
AuthorDate: Thu May 6 21:52:48 2021 +0800

    nsh/telnetd: bringup the network before telnetd init
    
    bringup the network before telnetd init if without NSH_CONSOLE
    
    Signed-off-by: chao.an <an...@xiaomi.com>
---
 nshlib/nsh_telnetd.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/nshlib/nsh_telnetd.c b/nshlib/nsh_telnetd.c
index 9105e23..0515993 100644
--- a/nshlib/nsh_telnetd.c
+++ b/nshlib/nsh_telnetd.c
@@ -47,6 +47,7 @@
 
 #include <arpa/inet.h>
 
+#include "netutils/netinit.h"
 #include "netutils/telnetd.h"
 
 #ifdef CONFIG_TELNET_CHARACTER_MODE
@@ -266,6 +267,12 @@ int nsh_telnetstart(sa_family_t family)
       nsh_initscript(vtbl);
 #endif
 
+#if defined(CONFIG_NSH_NETINIT) && !defined(CONFIG_NSH_CONSOLE)
+      /* Bring up the network */
+
+      netinit_bringup();
+#endif
+
       /* Perform architecture-specific final-initialization(if configured) */
 
 #if defined(CONFIG_NSH_ARCHINIT) && \