search for: curl_off_t

Displaying 1 result from an estimated 1 matches for "curl_off_t".

2020 Jan 08
1
[nbdkit PATCH] curl: use CURLINFO_CONTENT_LENGTH_DOWNLOAD_T when available
...ebug_verbose = 0; +#if CURL_AT_LEAST_VERSION(7, 55, 0) +#define HAVE_CURLINFO_CONTENT_LENGTH_DOWNLOAD_T +#endif + static void curl_load (void) { @@ -290,6 +294,9 @@ curl_open (int readonly) struct curl_handle *h; CURLcode r; double d; +#ifdef HAVE_CURLINFO_CONTENT_LENGTH_DOWNLOAD_T + curl_off_t o; +#endif h = calloc (1, sizeof *h); if (h == NULL) { @@ -377,6 +384,21 @@ curl_open (int readonly) goto err; } +#ifdef HAVE_CURLINFO_CONTENT_LENGTH_DOWNLOAD_T + r = curl_easy_getinfo (h->c, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, &o); + if (r != CURLE_OK) { + display_cur...