From 6a331af27fe6dc7842725d067fd2fb4a1c60c139 Mon Sep 17 00:00:00 2001 From: Anatol Pomozov Date: Mon, 13 Apr 2020 21:48:55 -0700 Subject: Implement multiplexed download using mCURL curl_multi_download_internal() is the main loop that creates up to 'ParallelDownloads' easy curl handles, adds them to mcurl and then performs curl execution. This is when the paralled downloads happens. Once any of the downloads complete the function checks its result. In case if the download fails it initiates retry with the next server from payload->servers list. At the download completion all the payload resources are cleaned up. curl_multi_check_finished_download() is essentially refactored version of curl_download_internal() adopted for multi_curl. Once mcurl porting is complete curl_download_internal() will be removed. Signed-off-by: Anatol Pomozov Signed-off-by: Allan McRae --- lib/libalpm/dload.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/libalpm/dload.h') diff --git a/lib/libalpm/dload.h b/lib/libalpm/dload.h index e87b6a93..a40b51b7 100644 --- a/lib/libalpm/dload.h +++ b/lib/libalpm/dload.h @@ -45,6 +45,8 @@ struct dload_payload { int cb_initialized; #ifdef HAVE_LIBCURL CURL *curl; + char error_buffer[CURL_ERROR_SIZE]; + FILE *localf; /* temp download file */ #endif }; -- cgit v1.2.3-24-g4f1b