tftp: another small tweak
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
adc08ef194
commit
1e9ac9f685
@ -561,11 +561,11 @@ static int tftp_protocol(
|
|||||||
io_bufsize = blksize + 4;
|
io_bufsize = blksize + 4;
|
||||||
}
|
}
|
||||||
# if ENABLE_FEATURE_TFTP_PROGRESS_BAR
|
# 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);
|
res = tftp_get_option("tsize", &rbuf[2], len - 2);
|
||||||
if (res) {
|
if (res) {
|
||||||
G.size = bb_strtoull(res, NULL, 10);
|
G.size = bb_strtoull(res, NULL, 10);
|
||||||
if (remote_file && G.size)
|
if (G.size)
|
||||||
tftp_progress_init();
|
tftp_progress_init();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -579,8 +579,8 @@ static int tftp_protocol(
|
|||||||
}
|
}
|
||||||
/* rfc2347:
|
/* rfc2347:
|
||||||
* "An option not acknowledged by the server
|
* "An option not acknowledged by the server
|
||||||
* must be ignored by the client and server
|
* must be ignored by the client and server
|
||||||
* as if it were never requested." */
|
* as if it were never requested." */
|
||||||
bb_error_msg("server only supports blocksize of 512");
|
bb_error_msg("server only supports blocksize of 512");
|
||||||
blksize = TFTP_BLKSIZE_DEFAULT;
|
blksize = TFTP_BLKSIZE_DEFAULT;
|
||||||
io_bufsize = TFTP_BLKSIZE_DEFAULT + 4;
|
io_bufsize = TFTP_BLKSIZE_DEFAULT + 4;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user