File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -440,6 +440,7 @@ static char *chunk_url(const char *store_url, const CaChunkID *id) {
440440}
441441
442442static int acquire_file (CaRemote * rr , CURL * handle ) {
443+ CURLcode c ;
443444 long protocol_status ;
444445 const char * url ;
445446
@@ -448,15 +449,13 @@ static int acquire_file(CaRemote *rr, CURL *handle) {
448449
449450 log_debug ("Acquiring %s..." , url );
450451
451- if (robust_curl_easy_perform (handle ) != CURLE_OK ) {
452- log_error ("Failed to acquire %s" , url );
453- return - EIO ;
454- }
452+ c = robust_curl_easy_perform (handle );
453+ if (c != CURLE_OK )
454+ return log_error_curle (c , "Failed to acquire %s" , url );
455455
456- if (curl_easy_getinfo (handle , CURLINFO_RESPONSE_CODE , & protocol_status ) != CURLE_OK ) {
457- log_error ("Failed to query response code" );
458- return - EIO ;
459- }
456+ c = curl_easy_getinfo (handle , CURLINFO_RESPONSE_CODE , & protocol_status );
457+ if (c != CURLE_OK )
458+ return log_error_curle (c , "Failed to query response code" );
460459
461460 if (!protocol_status_ok (arg_protocol , protocol_status )) {
462461 _cleanup_free_ char * m = NULL ;
You can’t perform that action at this time.
0 commit comments