Skip to content
Commit e83cc063 authored by Bartlomiej Sieka's avatar Bartlomiej Sieka Committed by Wolfgang Denk
Browse files

net: Make TFTP server timeout configurable



There are two aspects of a TFTP transfer involving timeouts:
1. timeout waiting for initial server reply after sending RRQ
2. timeouts while transferring actual data from the server

Since the upcoming auto-update feature attempts a TFTP download during each
boot, it is undesirable to have a long delay when the TFTP server is not
available. Thus, this commit makes the server timeout (1.) configurable by two
global variables:

TftpRRQTimeoutMSecs
TftpRRQTimeoutCountMax

TftpRRQTimeoutMSecs overrides default timeout when trying to connect to a TFTP
server, TftpRRQTimeoutCountMax overrides default number of connection retries.
The total delay when trying to download a file from a non-existing TFTP server
is TftpRRQTimeoutMSecs x TftpRRQTimeoutCountMax milliseconds.

Timeouts during file transfers (2.) are unaffected.

Signed-off-by: default avatarRafal Czubak <rcz@semihalf.com>
Signed-off-by: default avatarBartlomiej Sieka <tur@semihalf.com>
Signed-off-by: default avatarBen Warren <biggerbadderben@gmail.com>
parent 49f3bdbb
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment