diff options
author | Denys Vlasenko | 2009-11-08 18:15:10 +0100 |
---|---|---|
committer | Denys Vlasenko | 2009-11-08 18:15:10 +0100 |
commit | 1e9ac9f6853abb645c8d4a480d4ad6f09d7a8588 (patch) | |
tree | 2fa9473cf4ac1fb3745fd4b33c610771d177dfc3 /networking | |
parent | adc08ef19493edac3c3b62c823a1b6c30f582fae (diff) | |
download | busybox-1e9ac9f6853abb645c8d4a480d4ad6f09d7a8588.zip busybox-1e9ac9f6853abb645c8d4a480d4ad6f09d7a8588.tar.gz |
tftp: another small tweak
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking')
-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 cd5e50c..eddb148 100644 --- a/networking/tftp.c +++ b/networking/tftp.c @@ -561,11 +561,11 @@ static int tftp_protocol( io_bufsize = blksize + 4; } # if ENABLE_FEATURE_TFTP_PROGRESS_BAR - if (G.size == 0) { /* if we don't know it yet */ + if (remote_file && G.size == 0) { /* if we don't know it yet */ res = tftp_get_option("tsize", &rbuf[2], len - 2); if (res) { G.size = bb_strtoull(res, NULL, 10); - if (remote_file && G.size) + if (G.size) tftp_progress_init(); } } @@ -579,8 +579,8 @@ static int tftp_protocol( } /* rfc2347: * "An option not acknowledged by the server - * must be ignored by the client and server - * as if it were never requested." */ + * must be ignored by the client and server + * as if it were never requested." */ bb_error_msg("server only supports blocksize of 512"); blksize = TFTP_BLKSIZE_DEFAULT; io_bufsize = TFTP_BLKSIZE_DEFAULT + 4; |