From a2a06df24a01ae9393b7d3cdd0fc095665a99788 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Tue, 20 Jun 2023 09:25:33 +0200 Subject: [PATCH] [curl] NOPROGRESS --- src/protocol/curl/ftp.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/protocol/curl/ftp.c b/src/protocol/curl/ftp.c index 5b385e1a..140f1870 100644 --- a/src/protocol/curl/ftp.c +++ b/src/protocol/curl/ftp.c @@ -360,12 +360,6 @@ my_fwrite(void *buffer, size_t size, size_t nmemb, void *stream) return nmemb; } -static size_t -progress_callback(void *clientp, curl_off_t dltotal, curl_off_t dlnow, curl_off_t ultotal, curl_off_t ulnow) -{ - return 0; -} - static void done_ftpes(struct connection *conn) { @@ -442,9 +436,10 @@ do_ftpes(struct connection *conn) curl_easy_setopt(curl, CURLOPT_WRITEDATA, conn); curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, ftp->error); curl_easy_setopt(curl, CURLOPT_PRIVATE, conn); - /* pass struct to callback */ - curl_easy_setopt(curl, CURLOPT_XFERINFODATA, conn); - curl_easy_setopt(curl, CURLOPT_XFERINFOFUNCTION, progress_callback); + + curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1L); + //curl_easy_setopt(curl, CURLOPT_XFERINFODATA, conn); + //curl_easy_setopt(curl, CURLOPT_XFERINFOFUNCTION, progress_callback); /* enable TCP keep-alive for this transfer */ // curl_easy_setopt(curl, CURLOPT_TCP_KEEPALIVE, 1L);