diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2015-01-19 10:32:46 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2015-01-19 10:32:46 -0600 |
commit | 2891c97c221e758884aae7dae89b9a843600f227 (patch) | |
tree | 1fac8fec34c785c35f29993c2a57baaf5b9b66d3 | |
parent | c57b51517251cab05535dd7f97d7aa3c1556b044 (diff) | |
download | nuttx-2891c97c221e758884aae7dae89b9a843600f227.tar.gz nuttx-2891c97c221e758884aae7dae89b9a843600f227.tar.bz2 nuttx-2891c97c221e758884aae7dae89b9a843600f227.zip |
NSH library: Disable put and get commends of TFTP client is not enabled; disable wget command if web client is not enabled
-rw-r--r-- | apps/nshlib/nsh.h | 16 | ||||
-rw-r--r-- | nuttx/net/udp/udp_send.c | 2 |
2 files changed, 17 insertions, 1 deletions
diff --git a/apps/nshlib/nsh.h b/apps/nshlib/nsh.h index d726b5253..89c8763b2 100644 --- a/apps/nshlib/nsh.h +++ b/apps/nshlib/nsh.h @@ -160,6 +160,22 @@ # undef CONFIG_NSH_TELNET #endif +/* get and put require TFTP client support */ + +#ifndef CONFIG_NETUTILS_TFTPC +# undef CONFIG_NSH_DISABLE_PUT +# undef CONFIG_NSH_DISABLE_GET +# define CONFIG_NSH_DISABLE_PUT 1 +# define CONFIG_NSH_DISABLE_GET 1 +#endif + +/* wget depends on web client support */ + +#ifndef CONFIG_NETUTILS_WEBCLIENT +# undef CONFIG_NSH_DISABLE_WGET +# define CONFIG_NSH_DISABLE_WGET 1 +#endif + /* One front end must be defined */ #if !defined(CONFIG_NSH_CONSOLE) && !defined(CONFIG_NSH_TELNET) diff --git a/nuttx/net/udp/udp_send.c b/nuttx/net/udp/udp_send.c index e9fbf82da..ab71fbdc3 100644 --- a/nuttx/net/udp/udp_send.c +++ b/nuttx/net/udp/udp_send.c @@ -107,7 +107,7 @@ void udp_send(FAR struct net_driver_s *dev, FAR struct udp_conn_s *conn) { FAR struct udp_hdr_s *udp; - nllvdbg("IP payload: %d bytes\n", dev->d_len); + nllvdbg("UDP payload: %d (%d) bytes\n", dev->d_sndlen, dev->d_len); if (dev->d_sndlen > 0) { |