summaryrefslogtreecommitdiff
path: root/nuttx/netutils/tftpc
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-06-25 17:44:35 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-06-25 17:44:35 +0000
commit018ff6e65dcc563321d27d010e693dd8413e2f45 (patch)
treecd6fc22d2130b328328f2aeef39b8758673ec132 /nuttx/netutils/tftpc
parent50d5e799e29f7d1da649d43fee8382cdffe3fc89 (diff)
downloadpx4-nuttx-018ff6e65dcc563321d27d010e693dd8413e2f45.tar.gz
px4-nuttx-018ff6e65dcc563321d27d010e693dd8413e2f45.tar.bz2
px4-nuttx-018ff6e65dcc563321d27d010e693dd8413e2f45.zip
Consolidate buffer dumping; fix all occurrences of 'the the'
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1951 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/netutils/tftpc')
-rw-r--r--nuttx/netutils/tftpc/tftpc_internal.h2
-rw-r--r--nuttx/netutils/tftpc/tftpc_packets.c50
2 files changed, 2 insertions, 50 deletions
diff --git a/nuttx/netutils/tftpc/tftpc_internal.h b/nuttx/netutils/tftpc/tftpc_internal.h
index 9e853efba..214f7306d 100644
--- a/nuttx/netutils/tftpc/tftpc_internal.h
+++ b/nuttx/netutils/tftpc/tftpc_internal.h
@@ -161,7 +161,7 @@ extern ssize_t tftp_recvfrom(int sd, void *buf, size_t len, struct sockaddr_in *
extern ssize_t tftp_sendto(int sd, const void *buf, size_t len, struct sockaddr_in *to);
#ifdef CONFIG_NETUTILS_TFTP_DUMPBUFFERS
-extern void tftp_dumpbuffer(const char *msg, ubyte *buffer, int nbytes);
+# define tftp_dumpbuffer(msg, buffer, nbytes) nvdbgdumpbuffer(msg, buffer, nbytes)
#else
# define tftp_dumpbuffer(msg, buffer, nbytes)
#endif
diff --git a/nuttx/netutils/tftpc/tftpc_packets.c b/nuttx/netutils/tftpc/tftpc_packets.c
index 73e4bd110..d190c4f1a 100644
--- a/nuttx/netutils/tftpc/tftpc_packets.c
+++ b/nuttx/netutils/tftpc/tftpc_packets.c
@@ -1,7 +1,7 @@
/****************************************************************************
* netuils/tftp/tftpc_packets.c
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -326,52 +326,4 @@ ssize_t tftp_sendto(int sd, const void *buf, size_t len, struct sockaddr_in *to)
}
}
-/****************************************************************************
- * Name: tftp_sendto
- *
- * Description:
- * Dump a buffer of data
- *
- ****************************************************************************/
-
-#ifdef CONFIG_NETUTILS_TFTP_DUMPBUFFERS
-void tftp_dumpbuffer(const char *msg, ubyte *buffer, int nbytes)
-{
-#ifdef CONFIG_DEBUG
- char line[128];
- int ch;
- int i;
- int j;
-
- dbg("%s:\n", msg);
- for (i = 0; i < nbytes; i += 16)
- {
- sprintf(line, "%04x: ", i);
-
- for ( j = 0; j < 16; j++)
- {
- if (i + j < nbytes)
- {
- sprintf(&line[strlen(line)], "%02x ", buffer[i+j] );
- }
- else
- {
- strcpy(&line[strlen(line)], " ");
- }
- }
-
- for ( j = 0; j < 16; j++)
- {
- if (i + j < nbytes)
- {
- ch = buffer[i+j];
- sprintf(&line[strlen(line)], "%c", ch >= 0x20 && ch <= 0x7e ? ch : '.');
- }
- }
- dbg("%s\n", line);
- }
-#endif
-}
-#endif
-
#endif /* CONFIG_NET && CONFIG_NET_UDP && CONFIG_NFILE_DESCRIPTORS */