summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2002-01-16 22:50:04 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2002-01-16 22:50:04 +0000
commitcf42e73556a02b6789ca6c6f6aa058ac7f25b6b5 (patch)
tree5b5da64406b02adc1489047679c47668f65973af
parent46c109656ac51250a4f1695e56e3572828aac98e (diff)
downloadrtems-cf42e73556a02b6789ca6c6f6aa058ac7f25b6b5.tar.bz2
2001-01-16 Eric Norum <eric.norum@usask.ca>
* lib/tftpDriver.clib/tftpDriver.c: Fix TFTP block number checking.
-rw-r--r--c/src/exec/libnetworking/ChangeLog4
-rw-r--r--c/src/exec/libnetworking/lib/tftpDriver.c7
-rw-r--r--c/src/libnetworking/ChangeLog4
-rw-r--r--c/src/libnetworking/lib/tftpDriver.c7
-rw-r--r--cpukit/libnetworking/ChangeLog4
-rw-r--r--cpukit/libnetworking/lib/tftpDriver.c7
6 files changed, 21 insertions, 12 deletions
diff --git a/c/src/exec/libnetworking/ChangeLog b/c/src/exec/libnetworking/ChangeLog
index 39a5a42637..c5ee2afc0f 100644
--- a/c/src/exec/libnetworking/ChangeLog
+++ b/c/src/exec/libnetworking/ChangeLog
@@ -1,3 +1,7 @@
+2001-01-16 Eric Norum <eric.norum@usask.ca>
+
+ * lib/tftpDriver.clib/tftpDriver.c: Fix TFTP block number checking.
+
2002-02-05 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* pppd/sys-rtems.c: Remove unused variable status from
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;
diff --git a/c/src/libnetworking/ChangeLog b/c/src/libnetworking/ChangeLog
index 39a5a42637..c5ee2afc0f 100644
--- a/c/src/libnetworking/ChangeLog
+++ b/c/src/libnetworking/ChangeLog
@@ -1,3 +1,7 @@
+2001-01-16 Eric Norum <eric.norum@usask.ca>
+
+ * lib/tftpDriver.clib/tftpDriver.c: Fix TFTP block number checking.
+
2002-02-05 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* pppd/sys-rtems.c: Remove unused variable status from
diff --git a/c/src/libnetworking/lib/tftpDriver.c b/c/src/libnetworking/lib/tftpDriver.c
index d7626d601f..52f51748a5 100644
--- a/c/src/libnetworking/lib/tftpDriver.c
+++ b/c/src/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;
diff --git a/cpukit/libnetworking/ChangeLog b/cpukit/libnetworking/ChangeLog
index 39a5a42637..c5ee2afc0f 100644
--- a/cpukit/libnetworking/ChangeLog
+++ b/cpukit/libnetworking/ChangeLog
@@ -1,3 +1,7 @@
+2001-01-16 Eric Norum <eric.norum@usask.ca>
+
+ * lib/tftpDriver.clib/tftpDriver.c: Fix TFTP block number checking.
+
2002-02-05 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* pppd/sys-rtems.c: Remove unused variable status from
diff --git a/cpukit/libnetworking/lib/tftpDriver.c b/cpukit/libnetworking/lib/tftpDriver.c
index d7626d601f..52f51748a5 100644
--- a/cpukit/libnetworking/lib/tftpDriver.c
+++ b/cpukit/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;