summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-09-07 02:06:49 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-09-07 02:06:49 +0000
commitd46b55e6fa629e5ebd6ec6cb810e18390e5831d7 (patch)
tree864fb07d3a9fde0b8f3708acd03c7827cc2d6c92
parente6f729dd715010fbd49b3aebe49fecc4b27d0a8c (diff)
downloadnuttx-d46b55e6fa629e5ebd6ec6cb810e18390e5831d7.tar.gz
nuttx-d46b55e6fa629e5ebd6ec6cb810e18390e5831d7.tar.bz2
nuttx-d46b55e6fa629e5ebd6ec6cb810e18390e5831d7.zip
Fix initial block number
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@890 42af7a65-404d-4744-a932-0658087f49c3
-rw-r--r--nuttx/netutils/tftpc/tftpc_put.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/nuttx/netutils/tftpc/tftpc_put.c b/nuttx/netutils/tftpc/tftpc_put.c
index 2657d53f8..c62f8e17d 100644
--- a/nuttx/netutils/tftpc/tftpc_put.c
+++ b/nuttx/netutils/tftpc/tftpc_put.c
@@ -317,7 +317,7 @@ int tftpput(const char *local, const char *remote, in_addr_t addr, boolean binar
struct sockaddr_in server; /* The address of the TFTP server */
ubyte *packet; /* Allocated memory to hold one packet */
off_t offset; /* Offset into source file */
- uint16 blockno = 0; /* The current transfer block number */
+ uint16 blockno; /* The current transfer block number */
uint16 rblockno; /* The ACK'ed block number */
uint16 port = 0; /* This is the port number for the transfer */
int packetlen; /* The length of the data packet */
@@ -360,7 +360,8 @@ int tftpput(const char *local, const char *remote, in_addr_t addr, boolean binar
* of droppying packets if there is nothing hit in the ARP table.
*/
- retry = 0;
+ blockno = 1;
+ retry = 0;
for (;;)
{
packetlen = tftp_mkreqpacket(packet, TFTP_WRQ, remote, binary);