Skip to content

Commit 82edbf0

Browse files
author
olevole
committed
fix warning: deprecated
1 parent d403a68 commit 82edbf0

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

bin/src/cfetch.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,7 @@ fetch_files(char *urls, char *fout)
181181
if(!res) {
182182
/* check the size */
183183
double cl;
184-
res = curl_easy_getinfo(curl_handle, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &cl);
185-
// res = curl_easy_getinfo(curl_handle, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &cl);
184+
res = curl_easy_getinfo(curl_handle, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, &cl);
186185
if(!res) {
187186
//printf("Size: %.0f\n", cl);
188187
total_bytes=cl;
@@ -291,7 +290,7 @@ fetch_files(char *urls, char *fout)
291290
double dl;
292291
CURLcode res;
293292
/* check the size */
294-
res = curl_easy_getinfo(curl_handle, CURLINFO_SIZE_DOWNLOAD, &dl);
293+
res = curl_easy_getinfo(curl_handle, CURLINFO_SIZE_DOWNLOAD_T, &dl);
295294
if(!res) {
296295
printf("%.0f\n", dl / diff_time);
297296
}
@@ -335,7 +334,7 @@ handle_signal(int signal)
335334
double dl;
336335
CURLcode res;
337336
/* check the size */
338-
res = curl_easy_getinfo(curl_handle, CURLINFO_SIZE_DOWNLOAD, &dl);
337+
res = curl_easy_getinfo(curl_handle, CURLINFO_SIZE_DOWNLOAD_T, &dl);
339338
if(!res) {
340339
printf("%.0f\n", dl / diff_time);
341340
}

0 commit comments

Comments
 (0)