mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-11 07:24:46 +00:00
net: tftpput: reset timeout_count when an ACK is received
timeout_count is never reset once a tftpput transfer has started. If for whatever reason timeouts occur frequently, but the server keeps replying nonetheless, the transfer may be needlessly aborted. Reset timer_count on reception of an ACK to avoid this situation. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
This commit is contained in:
parent
da53e03290
commit
eeee0e2b85
1 changed files with 1 additions and 0 deletions
|
@ -478,6 +478,7 @@ static void tftp_handler(uchar *pkt, unsigned dest, struct in_addr sip,
|
|||
case TFTP_ACK:
|
||||
#ifdef CONFIG_CMD_TFTPPUT
|
||||
if (tftp_put_active) {
|
||||
timeout_count = 0;
|
||||
if (tftp_put_final_block_sent) {
|
||||
tftp_complete();
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue