aboutsummaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorbug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277>2004-02-22 03:33:53 +0000
committerbug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277>2004-02-22 03:33:53 +0000
commit8ebd21e503faf5993f6c23a4a110818a940fa284 (patch)
treea5317aa466da47a66728858bf646aed14c1d277c /networking
parent1900ce2e2767c4653fa5db3ae88a33e2f8fca0fd (diff)
downloadbusybox-w32-8ebd21e503faf5993f6c23a4a110818a940fa284.tar.gz
busybox-w32-8ebd21e503faf5993f6c23a4a110818a940fa284.tar.bz2
busybox-w32-8ebd21e503faf5993f6c23a4a110818a940fa284.zip
Ptch by Hideki IWAMOTO, fix a bug preventing tftp from getting or
putting more than 0xffff blocks. git-svn-id: svn://busybox.net/trunk/busybox@8534 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'networking')
-rw-r--r--networking/tftp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/networking/tftp.c b/networking/tftp.c
index 146857686..0bc562dd0 100644
--- a/networking/tftp.c
+++ b/networking/tftp.c
@@ -156,7 +156,7 @@ static inline int tftp(const int cmd, const struct hostent *host,
156 int opcode = 0; 156 int opcode = 0;
157 int finished = 0; 157 int finished = 0;
158 int timeout = bb_tftp_num_retries; 158 int timeout = bb_tftp_num_retries;
159 int block_nr = 1; 159 unsigned short block_nr = 1;
160 160
161#ifdef CONFIG_FEATURE_TFTP_BLOCKSIZE 161#ifdef CONFIG_FEATURE_TFTP_BLOCKSIZE
162 int want_option_ack = 0; 162 int want_option_ack = 0;
@@ -462,7 +462,7 @@ static inline int tftp(const int cmd, const struct hostent *host,
462 462
463 if (cmd_put && (opcode == TFTP_ACK)) { 463 if (cmd_put && (opcode == TFTP_ACK)) {
464 464
465 if (tmp == (block_nr - 1)) { 465 if (tmp == (unsigned short)(block_nr - 1)) {
466 if (finished) { 466 if (finished) {
467 break; 467 break;
468 } 468 }