summaryrefslogtreecommitdiff
path: root/nuttx/examples
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-11-23 13:31:28 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-11-23 13:31:28 +0000
commit403a4936c8fc3756003a28328c18c770bc914b6d (patch)
tree1f09ba2f05bd7c92efe529d4f4bc0a065b4b3298 /nuttx/examples
parent797f58d1f0e2265f7c3c054eb1b8f7bfe4fcecfc (diff)
downloadpx4-nuttx-403a4936c8fc3756003a28328c18c770bc914b6d.tar.gz
px4-nuttx-403a4936c8fc3756003a28328c18c770bc914b6d.tar.bz2
px4-nuttx-403a4936c8fc3756003a28328c18c770bc914b6d.zip
Debug UDP send logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@401 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/examples')
-rw-r--r--nuttx/examples/README.txt6
-rw-r--r--nuttx/examples/udp/Makefile2
-rw-r--r--nuttx/examples/udp/udp-client.c2
3 files changed, 8 insertions, 2 deletions
diff --git a/nuttx/examples/README.txt b/nuttx/examples/README.txt
index 6ef65e924..0ba708925 100644
--- a/nuttx/examples/README.txt
+++ b/nuttx/examples/README.txt
@@ -61,3 +61,9 @@ examples/netttest
This is a simple network test for verifying client- and server-
functionality in a TCP/IP connection.
+examples/udp
+^^^^^^^^^^^^
+
+ This is a simple network test for verifying client- and server-
+ functionality over UDP.
+
diff --git a/nuttx/examples/udp/Makefile b/nuttx/examples/udp/Makefile
index 6fec19147..3dcc57213 100644
--- a/nuttx/examples/udp/Makefile
+++ b/nuttx/examples/udp/Makefile
@@ -58,7 +58,7 @@ TARG_BIN = lib$(CONFIG_EXAMPLE)$(LIBEXT)
HOSTCFLAGS += -DCONFIG_EXAMPLE_UDP_HOST=1
ifeq ($(CONFIG_EXAMPLE_UDP_SERVER),y)
HOSTCFLAGS += -DCONFIG_EXAMPLE_UDP_SERVER=1 \
- -DCONFIG_EXAMPLE_UDP_CLIENTIP="$(CONFIG_EXAMPLE_UDP_CLIENTIP)"
+ -DCONFIG_EXAMPLE_UDP_SERVERIP="$(CONFIG_EXAMPLE_UDP_SERVERIP)"
endif
HOST_SRCS = host.c
diff --git a/nuttx/examples/udp/udp-client.c b/nuttx/examples/udp/udp-client.c
index 8ea9cffb6..545a3a6c3 100644
--- a/nuttx/examples/udp/udp-client.c
+++ b/nuttx/examples/udp/udp-client.c
@@ -107,7 +107,7 @@ void send_client(void)
message("client: %d. Sending %d bytes\n", offset, SENDSIZE);
nbytes = sendto(sockfd, outbuf, SENDSIZE, 0,
(struct sockaddr*)&server, sizeof(struct sockaddr_in));
- message("client: %d. Sent %d bytes\n", nbytes);
+ message("client: %d. Sent %d bytes\n", offset, nbytes);
if (nbytes < 0)
{