From: Rutger Hofman Date: Wed, 10 Nov 2010 14:08:18 +0000 (+0100) Subject: TFTP: resend the correct data X-Git-Tag: curl-7_21_3~76 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=592df29f9cdf6274fa85f1bf060e6ca57e50e675;p=curl 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. --- diff --git a/lib/tftp.c b/lib/tftp.c index 782bb7367..46ed2a71e 100644 --- a/lib/tftp.c +++ b/lib/tftp.c @@ -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);