summaryrefslogtreecommitdiff
path: root/lib/tftp.c
diff options
context:
space:
mode:
authorRutger Hofman <rutger@cs.vu.nl>2010-11-10 15:08:18 +0100
committerDaniel Stenberg <daniel@haxx.se>2010-11-10 15:08:18 +0100
commit592df29f9cdf6274fa85f1bf060e6ca57e50e675 (patch)
treecfd10aac4d71a589442d5edda8d7d2c123d0ac5f /lib/tftp.c
parentf1db21218b35b618f622deb94b6e5ab2c62bbd17 (diff)
downloadcurl-592df29f9cdf6274fa85f1bf060e6ca57e50e675.tar.gz
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.
Diffstat (limited to 'lib/tftp.c')
-rw-r--r--lib/tftp.c2
1 files changed, 1 insertions, 1 deletions
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);