diff options
Diffstat (limited to '')
-rw-r--r-- | c/src/exec/libnetworking/lib/tftpDriver.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/c/src/exec/libnetworking/lib/tftpDriver.c b/c/src/exec/libnetworking/lib/tftpDriver.c index d7626d601f..52f51748a5 100644 --- a/c/src/exec/libnetworking/lib/tftpDriver.c +++ b/c/src/exec/libnetworking/lib/tftpDriver.c @@ -721,10 +721,9 @@ static int rtems_tftp_open_worker( } if (tp->writing && (opcode == TFTP_OPCODE_ACK) - && ((ntohs (tp->pkbuf.tftpACK.blocknum) == 0) - || (ntohs (tp->pkbuf.tftpACK.blocknum) == 1))) { + && (ntohs (tp->pkbuf.tftpACK.blocknum) == 0)) { tp->nused = 0; - tp->blocknum = ntohs (tp->pkbuf.tftpACK.blocknum); + tp->blocknum = 1; break; } if (opcode == TFTP_OPCODE_ERROR) { @@ -891,7 +890,7 @@ static int rtems_tftp_flush ( struct tftpStream *tp ) if (rlen >= (int)sizeof tp->pkbuf.tftpACK) { int opcode = ntohs (tp->pkbuf.tftpACK.opcode); if ((opcode == TFTP_OPCODE_ACK) - && (ntohs (tp->pkbuf.tftpACK.blocknum) == (tp->blocknum + 1))) { + && (ntohs (tp->pkbuf.tftpACK.blocknum) == tp->blocknum)) { tp->nused = 0; tp->blocknum++; return 0; |