diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-09-07 01:27:42 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-09-07 01:27:42 +0000 |
commit | e6f729dd715010fbd49b3aebe49fecc4b27d0a8c (patch) | |
tree | 5a91b7459fb29bd46eb87cfb46ccea90a50eff6a /nuttx/netutils/tftpc/tftpc_get.c | |
parent | 4d69dacca30e9955a11cfe67a48bf54176fb23d4 (diff) | |
download | nuttx-e6f729dd715010fbd49b3aebe49fecc4b27d0a8c.tar.gz nuttx-e6f729dd715010fbd49b3aebe49fecc4b27d0a8c.tar.bz2 nuttx-e6f729dd715010fbd49b3aebe49fecc4b27d0a8c.zip |
Remove non-standard option
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@889 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/netutils/tftpc/tftpc_get.c')
-rw-r--r-- | nuttx/netutils/tftpc/tftpc_get.c | 43 |
1 files changed, 2 insertions, 41 deletions
diff --git a/nuttx/netutils/tftpc/tftpc_get.c b/nuttx/netutils/tftpc/tftpc_get.c index e1b0e10d5..1471fb0a0 100644 --- a/nuttx/netutils/tftpc/tftpc_get.c +++ b/nuttx/netutils/tftpc/tftpc_get.c @@ -34,10 +34,6 @@ ****************************************************************************/ /**************************************************************************** - * Compilation Switches - ****************************************************************************/ - -/**************************************************************************** * Included Files ****************************************************************************/ @@ -163,11 +159,6 @@ int tftpget(const char *remote, const char *local, in_addr_t addr, boolean binar int result = ERROR; /* Assume failure */ int ret; /* Generic return status */ -#if CONFIG_NETUTILS_TFTP_ACKPACKETS > 1 - uint16 lastacked = 0; /* The last block number that was ACK'ed */ - int ablockno; /* Number of un-ACKed packets */ -#endif - /* Allocate the buffer to used for socket/disk I/O */ packet = (ubyte*)zalloc(TFTP_IOBUFSIZE); @@ -215,9 +206,6 @@ int tftpget(const char *remote, const char *local, in_addr_t addr, boolean binar * been received or until an error occurs. */ -#if CONFIG_NETUTILS_TFTP_ACKPACKETS > 1 - ablockno = CONFIG_NETUTILS_TFTP_ACKPACKETS-1; -#endif do { /* Increment the TFTP block number for the next transfer */ @@ -301,35 +289,8 @@ int tftpget(const char *remote, const char *local, in_addr_t addr, boolean binar goto errout_with_sd; } - /* Send the acknowledgment if we have reach the configured block count */ - -#if CONFIG_NETUTILS_TFTP_ACKPACKETS > 1 - ablockno++; - if (ablockno == CONFIG_NETUTILS_TFTP_ACKPACKETS) -#endif - { - len = tftp_mkackpacket(packet, blockno); - ret = tftp_sendto(sd, packet, len, &server); - if (ret != len) - { - goto errout_with_sd; - } -#if CONFIG_NETUTILS_TFTP_ACKPACKETS > 1 - lastacked = blockno; -#endif - nvdbg("ACK blockno %d\n", blockno); - } - } - while (ndatabytes >= TFTP_DATASIZE); - - /* The final packet of the transfer will be a partial packet - * - * If the final packet(s) were not ACK'ed, then we will ACK them here - */ + /* Send the acknowledgment */ -#if CONFIG_NETUTILS_TFTP_ACKPACKETS > 1 - if (ndatabytes < TFTP_DATASIZE && blockno != lastacked) - { len = tftp_mkackpacket(packet, blockno); ret = tftp_sendto(sd, packet, len, &server); if (ret != len) @@ -338,7 +299,7 @@ int tftpget(const char *remote, const char *local, in_addr_t addr, boolean binar } nvdbg("ACK blockno %d\n", blockno); } -#endif + while (ndatabytes >= TFTP_DATASIZE); /* Return success */ |