libalpm: Log URLs when retrying
Allow finding which mirror was used to fetch a file. This makes it a bit easier to debug situations in which mirrors serve bad files with HTTP 200. Signed-off-by: Vladimir Panteleev <archlinux@cy.md>
This commit is contained in:
parent
529e208f39
commit
b242f5f24c
1 changed files with 3 additions and 0 deletions
|
@ -427,6 +427,9 @@ static int curl_retry_next_server(CURLM *curlm, CURL *curl, struct dload_payload
|
||||||
len = strlen(server) + strlen(payload->filepath) + 2;
|
len = strlen(server) + strlen(payload->filepath) + 2;
|
||||||
MALLOC(payload->fileurl, len, RET_ERR(handle, ALPM_ERR_MEMORY, -1));
|
MALLOC(payload->fileurl, len, RET_ERR(handle, ALPM_ERR_MEMORY, -1));
|
||||||
snprintf(payload->fileurl, len, "%s/%s", server, payload->filepath);
|
snprintf(payload->fileurl, len, "%s/%s", server, payload->filepath);
|
||||||
|
_alpm_log(handle, ALPM_LOG_DEBUG,
|
||||||
|
"%s: retrying from %s\n",
|
||||||
|
payload->remote_name, payload->fileurl);
|
||||||
|
|
||||||
|
|
||||||
fflush(payload->localf);
|
fflush(payload->localf);
|
||||||
|
|
Loading…
Add table
Reference in a new issue