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.
This commit is contained in:
Rutger Hofman 2010-11-10 15:08:18 +01:00 committed by Daniel Stenberg
parent f1db21218b
commit 592df29f9c
1 changed files with 1 additions and 1 deletions

View File

@ -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);