mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-19 11:23:07 +08:00
The alternate console device CONFIG_NSH_CONDEV must not be defined unconditionally. This causes errors when using Telnet sessions. This was solved by adding CONFIG_NSH_ALTCONDEV: CONFIG_NSH_ALTCONDEV enables or disables the feature then, if enabled, CONFIG_NSH_CONDEV provides the alternative console device name
This commit is contained in:
@@ -312,7 +312,7 @@ static void nsh_consolerelease(FAR struct nsh_vtbl_s *vtbl)
|
||||
|
||||
/* Close the console stream */
|
||||
|
||||
#ifdef CONFIG_NSH_CONDEV
|
||||
#ifdef CONFIG_NSH_ALTCONDEV
|
||||
(void)fclose(pstate->cn_constream);
|
||||
#endif
|
||||
#endif
|
||||
@@ -462,7 +462,7 @@ FAR struct console_stdio_s *nsh_newconsole(void)
|
||||
|
||||
/* (Re-) open the console input device */
|
||||
|
||||
#ifdef CONFIG_NSH_CONDEV
|
||||
#ifdef CONFIG_NSH_ALTCONDEV
|
||||
pstate->cn_confd = open(CONFIG_NSH_CONDEV, O_RDWR);
|
||||
if (pstate->cn_confd < 0)
|
||||
{
|
||||
|
Reference in New Issue
Block a user