diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2011-04-11 04:29:39 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-04-11 04:29:39 +0200 |
commit | 24ec952f1403759af280661b83471b28f1158553 (patch) | |
tree | 32db92eb148a4888e6b4557c2b3b08a05a71dc88 | |
parent | c13ee8c0f32fa816e12f1ac0c55a800066dc1560 (diff) | |
download | busybox-w32-24ec952f1403759af280661b83471b28f1158553.tar.gz busybox-w32-24ec952f1403759af280661b83471b28f1158553.tar.bz2 busybox-w32-24ec952f1403759af280661b83471b28f1158553.zip |
tftp: fix progress bar for large (>32M) files. Closes 3499
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | networking/tftp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/networking/tftp.c b/networking/tftp.c index f52e49d51..e50d9254b 100644 --- a/networking/tftp.c +++ b/networking/tftp.c | |||
@@ -455,6 +455,7 @@ static int tftp_protocol( | |||
455 | finished = 1; | 455 | finished = 1; |
456 | } | 456 | } |
457 | cp += len; | 457 | cp += len; |
458 | IF_FEATURE_TFTP_PROGRESS_BAR(G.pos += len;) | ||
458 | } | 459 | } |
459 | send_pkt: | 460 | send_pkt: |
460 | /* Send packet */ | 461 | /* Send packet */ |
@@ -476,8 +477,6 @@ static int tftp_protocol( | |||
476 | xsendto(socket_fd, xbuf, send_len, &peer_lsa->u.sa, peer_lsa->len); | 477 | xsendto(socket_fd, xbuf, send_len, &peer_lsa->u.sa, peer_lsa->len); |
477 | 478 | ||
478 | #if ENABLE_FEATURE_TFTP_PROGRESS_BAR | 479 | #if ENABLE_FEATURE_TFTP_PROGRESS_BAR |
479 | if (ENABLE_TFTP && remote_file) /* tftp */ | ||
480 | G.pos = (block_nr - 1) * (uoff_t)blksize; | ||
481 | if (is_bb_progress_inited(&G.pmt)) | 480 | if (is_bb_progress_inited(&G.pmt)) |
482 | tftp_progress_update(); | 481 | tftp_progress_update(); |
483 | #endif | 482 | #endif |
@@ -621,6 +620,7 @@ static int tftp_protocol( | |||
621 | if (sz != blksize) { | 620 | if (sz != blksize) { |
622 | finished = 1; | 621 | finished = 1; |
623 | } | 622 | } |
623 | IF_FEATURE_TFTP_PROGRESS_BAR(G.pos += sz;) | ||
624 | continue; /* send ACK */ | 624 | continue; /* send ACK */ |
625 | } | 625 | } |
626 | /* Disabled to cope with servers with Sorcerer's Apprentice Syndrome */ | 626 | /* Disabled to cope with servers with Sorcerer's Apprentice Syndrome */ |