* Copyright 2011 Comelit Group SpA,
*/
-#include <common.h>
#include <command.h>
#include <display_options.h>
#include <efi_loader.h>
tftp_prev_block = tftp_cur_block;
tftp_cur_block = (unsigned short)(block + 1);
update_block_number();
- if (ack_ok)
+ if (ack_ok) {
+ if (block == 0 &&
+ tftp_state == STATE_SEND_WRQ){
+ /* connection's first ACK */
+ tftp_state = STATE_DATA;
+ tftp_remote_port = src;
+ }
tftp_send(); /* Send next data block */
+ }
}
}
#endif
}
}
-
static void tftp_timeout_handler(void)
{
if (++timeout_count > timeout_count_max) {