diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-12-10 18:37:43 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-12-10 18:37:43 -0600 |
commit | 1da6966e3b44d9b995b82391c48112105a082446 (patch) | |
tree | 67504d54e02be3c14b27b78c6a9c283e50193f6c /apps/netutils | |
parent | 3182a60d169d80a6541dd28f5eead48e632c3300 (diff) | |
download | nuttx-1da6966e3b44d9b995b82391c48112105a082446.tar.gz nuttx-1da6966e3b44d9b995b82391c48112105a082446.tar.bz2 nuttx-1da6966e3b44d9b995b82391c48112105a082446.zip |
NSH TFTP get command: Wrong file name used for the destination. From Lazlo
Diffstat (limited to 'apps/netutils')
-rw-r--r-- | apps/netutils/tftpc/tftpc_get.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/netutils/tftpc/tftpc_get.c b/apps/netutils/tftpc/tftpc_get.c index 4a4789c05..ddc518a2b 100644 --- a/apps/netutils/tftpc/tftpc_get.c +++ b/apps/netutils/tftpc/tftpc_get.c @@ -145,11 +145,12 @@ static inline int tftp_parsedatapacket(const uint8_t *packet, * ****************************************************************************/ -int tftpget(const char *remote, const char *local, in_addr_t addr, bool binary) +int tftpget(FAR const char *remote, FAR const char *local, in_addr_t addr, + bool binary) { struct sockaddr_in server; /* The address of the TFTP server */ struct sockaddr_in from; /* The address the last UDP message recv'd from */ - uint8_t *packet; /* Allocated memory to hold one packet */ + FAR uint8_t *packet; /* Allocated memory to hold one packet */ uint16_t blockno = 0; /* The current transfer block number */ uint16_t opcode; /* Received opcode */ uint16_t rblockno; /* Received block number */ @@ -164,7 +165,7 @@ int tftpget(const char *remote, const char *local, in_addr_t addr, bool binary) /* Allocate the buffer to used for socket/disk I/O */ - packet = (uint8_t*)zalloc(TFTP_IOBUFSIZE); + packet = (FAR uint8_t*)zalloc(TFTP_IOBUFSIZE); if (!packet) { ndbg("packet memory allocation failure\n"); |