svn_rev_440
what a silly bug of mine. Chances were good we generated a negative port number causing tftp to fail
This commit is contained in:
parent
49e479cecb
commit
be8b9a1abb
|
@ -355,7 +355,7 @@ TftpStart (void)
|
||||||
TftpTimeoutCount = 0;
|
TftpTimeoutCount = 0;
|
||||||
TftpState = STATE_RRQ;
|
TftpState = STATE_RRQ;
|
||||||
/* Use a pseudo-random port unless a specific port is set */
|
/* Use a pseudo-random port unless a specific port is set */
|
||||||
TftpOurPort = 1024 + ((int)get_time_ns() % 3072);
|
TftpOurPort = 1024 + ((unsigned int)get_time_ns() % 3072);
|
||||||
#ifdef CONFIG_TFTP_PORT
|
#ifdef CONFIG_TFTP_PORT
|
||||||
if ((ep = getenv("tftpdstp")) != NULL) {
|
if ((ep = getenv("tftpdstp")) != NULL) {
|
||||||
TftpServerPort = simple_strtol(ep, NULL, 10);
|
TftpServerPort = simple_strtol(ep, NULL, 10);
|
||||||
|
|
Loading…
Reference in New Issue