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:
Gregory Nutt
2014-05-05 08:52:02 -06:00
parent 025d47b0b7
commit 7a98f10283
7 changed files with 91 additions and 35 deletions

View File

@@ -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)
{