aboutsummaryrefslogtreecommitdiff
path: root/lib/tftp.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tftp.c')
-rw-r--r--lib/tftp.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/tftp.c b/lib/tftp.c
index 711bf1720..9c459a975 100644
--- a/lib/tftp.c
+++ b/lib/tftp.c
@@ -261,11 +261,10 @@ static void tftp_send_first(tftp_state_data_t *state, tftp_event_t event)
if(data->set.upload) {
/* If we are uploading, send an WRQ */
state->spacket.event = htons(TFTP_EVENT_WRQ);
- filename = curl_unescape(filename, (int)strlen(filename));
+ filename = curl_easy_unescape(data, filename, 0, NULL);
state->conn->upload_fromhere = (char *)state->spacket.u.data.data;
- if(data->set.infilesize != -1) {
+ if(data->set.infilesize != -1)
Curl_pgrsSetUploadSize(data, data->set.infilesize);
- }
}
else {
/* If we are downloading, send an RRQ */