From dc98d0ea09f3632cd28a12099f3f09d466dcad1d Mon Sep 17 00:00:00 2001 From: Anatol Pomozov Date: Mon, 9 Mar 2020 15:23:12 -0700 Subject: Add multi_curl handle to ALPM global context To be able to run multiple download in parallel efficiently we need to use curl_multi interface [1]. It introduces a set of APIs over new type of handler 'CURLM'. Create CURLM object at the application start and set it to global ALPM context. The 'single-download' CURL handle moves to payload struct. A new CURL handle is created for each payload with intention to be processed by CURLM. Note that curl_download_internal() is not ported to CURLM interface due to the fact that the function will go away soon. [1] https://curl.haxx.se/libcurl/c/libcurl-multi.html Signed-off-by: Allan McRae --- lib/libalpm/handle.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libalpm/handle.h') diff --git a/lib/libalpm/handle.h b/lib/libalpm/handle.h index cd7104f9..9fef0fbf 100644 --- a/lib/libalpm/handle.h +++ b/lib/libalpm/handle.h @@ -59,7 +59,7 @@ struct __alpm_handle_t { #ifdef HAVE_LIBCURL /* libcurl handle */ - CURL *curl; /* reusable curl_easy handle */ + CURLM *curlm; unsigned short disable_dl_timeout; unsigned int parallel_downloads; /* number of download streams */ #endif -- cgit v1.2.3-54-g00ecf