Commit 592df29f authored by Rutger Hofman's avatar Rutger Hofman Committed by Daniel Stenberg
Browse files

TFTP: resend the correct data

I found a bug in tftp_tx() in tftp.c. If a data resend is done after
reception of an ACK/OACK, the call to sendto is wrong.
parent f1db2121
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -738,7 +738,7 @@ static CURLcode tftp_tx(tftp_state_data_t *state, tftp_event_t event)
        }
        else {
          /* Re-send the data packet */
          sbytes = sendto(state->sockfd, (void *)&state->spacket,
          sbytes = sendto(state->sockfd, (void *)&state->spacket.data,
                          4+state->sbytes, SEND_4TH_ARG,
                          (struct sockaddr *)&state->remote_addr,
                          state->remote_addrlen);