diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-10-29 15:25:34 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-10-29 15:25:34 -0600 |
commit | 8bcb9dd25ee2794e367a0afa943ca2a6faf7fad9 (patch) | |
tree | 78554ae0f4570dcbfed310658230ee44494f2085 /apps/nshlib | |
parent | c6ca0dea50eb950b937c877323ba61758f17acdf (diff) | |
download | nuttx-8bcb9dd25ee2794e367a0afa943ca2a6faf7fad9.tar.gz nuttx-8bcb9dd25ee2794e367a0afa943ca2a6faf7fad9.tar.bz2 nuttx-8bcb9dd25ee2794e367a0afa943ca2a6faf7fad9.zip |
Fix some errors that I introduced into NSH telnet this morning
Diffstat (limited to 'apps/nshlib')
-rw-r--r-- | apps/nshlib/nsh_telnetd.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/nshlib/nsh_telnetd.c b/apps/nshlib/nsh_telnetd.c index d76308f42..0602081cb 100644 --- a/apps/nshlib/nsh_telnetd.c +++ b/apps/nshlib/nsh_telnetd.c @@ -112,12 +112,13 @@ static void nsh_telnetecho(FAR struct console_stdio_s *pstate, uint8_t is_use) * Name: nsh_telnettoken ****************************************************************************/ -static nsh_telnettoken(FAR struct console_stdio_s *pstate, FAR char *buffer, - size_t buflen) +#ifdef CONFIG_NSH_TELNET_LOGIN +static void nsh_telnettoken(FAR struct console_stdio_s *pstate, + FAR char *buffer, size_t buflen) { FAR char *start; FAR char *endp1; - bool quoated = false; + bool quoted = false; /* Find the start of token. Either (1) the first non-white space * character on the command line or (2) the character immediately after @@ -154,7 +155,7 @@ static nsh_telnettoken(FAR struct console_stdio_s *pstate, FAR char *buffer, * any whitespace. */ - for (endp1 = start; *endp1; endp1++); + for (endp1 = start; *endp1; endp1++) { /* Did the token begin with a quotation mark? */ @@ -190,6 +191,7 @@ static nsh_telnettoken(FAR struct console_stdio_s *pstate, FAR char *buffer, strncpy(buffer, start, buflen); } +#endif /**************************************************************************** * Name: nsh_telnetlogin |