diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-11-08 18:15:10 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-11-08 18:15:10 +0100 |
commit | 1e9ac9f6853abb645c8d4a480d4ad6f09d7a8588 (patch) | |
tree | 2fa9473cf4ac1fb3745fd4b33c610771d177dfc3 | |
parent | adc08ef19493edac3c3b62c823a1b6c30f582fae (diff) | |
download | busybox-w32-1e9ac9f6853abb645c8d4a480d4ad6f09d7a8588.tar.gz busybox-w32-1e9ac9f6853abb645c8d4a480d4ad6f09d7a8588.tar.bz2 busybox-w32-1e9ac9f6853abb645c8d4a480d4ad6f09d7a8588.zip |
tftp: another small tweak
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | networking/tftp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/networking/tftp.c b/networking/tftp.c index cd5e50c3c..eddb1486b 100644 --- a/networking/tftp.c +++ b/networking/tftp.c | |||
@@ -561,11 +561,11 @@ static int tftp_protocol( | |||
561 | io_bufsize = blksize + 4; | 561 | io_bufsize = blksize + 4; |
562 | } | 562 | } |
563 | # if ENABLE_FEATURE_TFTP_PROGRESS_BAR | 563 | # if ENABLE_FEATURE_TFTP_PROGRESS_BAR |
564 | if (G.size == 0) { /* if we don't know it yet */ | 564 | if (remote_file && G.size == 0) { /* if we don't know it yet */ |
565 | res = tftp_get_option("tsize", &rbuf[2], len - 2); | 565 | res = tftp_get_option("tsize", &rbuf[2], len - 2); |
566 | if (res) { | 566 | if (res) { |
567 | G.size = bb_strtoull(res, NULL, 10); | 567 | G.size = bb_strtoull(res, NULL, 10); |
568 | if (remote_file && G.size) | 568 | if (G.size) |
569 | tftp_progress_init(); | 569 | tftp_progress_init(); |
570 | } | 570 | } |
571 | } | 571 | } |
@@ -579,8 +579,8 @@ static int tftp_protocol( | |||
579 | } | 579 | } |
580 | /* rfc2347: | 580 | /* rfc2347: |
581 | * "An option not acknowledged by the server | 581 | * "An option not acknowledged by the server |
582 | * must be ignored by the client and server | 582 | * must be ignored by the client and server |
583 | * as if it were never requested." */ | 583 | * as if it were never requested." */ |
584 | bb_error_msg("server only supports blocksize of 512"); | 584 | bb_error_msg("server only supports blocksize of 512"); |
585 | blksize = TFTP_BLKSIZE_DEFAULT; | 585 | blksize = TFTP_BLKSIZE_DEFAULT; |
586 | io_bufsize = TFTP_BLKSIZE_DEFAULT + 4; | 586 | io_bufsize = TFTP_BLKSIZE_DEFAULT + 4; |