tftp: another small tweak

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2009-11-08 18:15:10 +01:00
parent adc08ef194
commit 1e9ac9f685

View File

@ -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();
}
}