Skip to content

Commit 97530dd

Browse files
dchbapt
authored andcommitted
fetch: display curl IP address we are fetching from in debug mode
1 parent cd1bcc3 commit 97530dd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

libpkg/fetch_libcurl.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,12 @@ curl_do_fetch(struct curl_userdata *data, CURL *cl, struct curl_repodata *cr, CU
202202
CURL *eh = msg->easy_handle;
203203
long response_code = 0;
204204
curl_easy_getinfo(eh, CURLINFO_RESPONSE_CODE, &response_code);
205+
206+
char *ip = NULL;
207+
if (curl_easy_getinfo(eh, CURLINFO_PRIMARY_IP, &ip) == CURLE_OK && ip != NULL) {
208+
pkg_dbg(PKG_DBG_FETCH, 1, "CURL> connected to IP %s", ip);
209+
}
210+
205211
return (response_code);
206212
}
207213
}

0 commit comments

Comments
 (0)