]> Git Repo - J-u-boot.git/blobdiff - net/tftp.c
Merge patch series "Bug-fixes for a few boards"
[J-u-boot.git] / net / tftp.c
index 65c39d7fb7089abbf989b5213da26667ee0f3d62..2e073183d5ab8a0a08a6c59e4e11f4e52eb9a8b8 100644 (file)
@@ -493,8 +493,15 @@ static void tftp_handler(uchar *pkt, unsigned dest, struct in_addr sip,
                                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
This page took 0.024015 seconds and 4 git commands to generate.