From 592df29f9cdf6274fa85f1bf060e6ca57e50e675 Mon Sep 17 00:00:00 2001 From: Rutger Hofman Date: Wed, 10 Nov 2010 15:08:18 +0100 Subject: 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. --- lib/tftp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v1.2.3