9
0
Fork 0

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:
Sascha Hauer 2007-07-05 18:01:54 +02:00 committed by Sascha Hauer
parent 49e479cecb
commit be8b9a1abb
1 changed files with 1 additions and 1 deletions

View File

@ -355,7 +355,7 @@ TftpStart (void)
TftpTimeoutCount = 0;
TftpState = STATE_RRQ;
/* 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
if ((ep = getenv("tftpdstp")) != NULL) {
TftpServerPort = simple_strtol(ep, NULL, 10);