[U-Boot] tftp packet failure counter reset

Jeffery Palmer jefferypalmer at hotmail.com
Wed Sep 23 01:20:29 CEST 2009


I do large transfers via tftp, and since the timeout counter never resets, they often fail since the failures are counted throughout the entire transfer. By resetting the counter to 0 on a successful packet, this issue is fixed



tftp.c:
                } else {
                        if (((TftpBlock - 1) % 10) == 0) {
                                putc ('#');
                        } else if ((TftpBlock % (10 * HASHES_PER_LINE)) == 0) {
                                puts ("\n\t ");
                        }
+                       //Reset timeout count since we received a good packet
+                       TftpTimeoutCount = 0;
                }

                if (TftpState == STATE_RRQ)
_________________________________________________________________
Hotmail: Free, trusted and rich email service.
http://clk.atdmt.com/GBL/go/171222984/direct/01/


More information about the U-Boot mailing list