diff options
Diffstat (limited to 'networking/tftp.c')
-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; |