summaryrefslogtreecommitdiffstats
path: root/lib/libalpm
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2011-10-15 01:49:53 +0200
committerDan McGee <dan@archlinux.org>2011-10-17 15:40:20 +0200
commitb633985e609dcd0cd898a3d4d7a59241ccf52084 (patch)
tree76b80e625c388dc5d9c1d8d07f3304a4d570adb4 /lib/libalpm
parent758d3403cd1221ec89ac3a56183974da6a96dc10 (diff)
downloadpacman-b633985e609dcd0cd898a3d4d7a59241ccf52084.tar.gz
pacman-b633985e609dcd0cd898a3d4d7a59241ccf52084.tar.xz
dload: add pointer to server list for each payload
Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/dload.h1
-rw-r--r--lib/libalpm/sync.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/libalpm/dload.h b/lib/libalpm/dload.h
index 27d865d6..158e0b77 100644
--- a/lib/libalpm/dload.h
+++ b/lib/libalpm/dload.h
@@ -38,6 +38,7 @@ struct dload_payload {
int allow_resume;
int errors_ok;
int unlink_on_fail;
+ const alpm_list_t *servers;
#ifdef HAVE_LIBCURL
CURLcode curlerr; /* last error produced by curl */
#endif
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index 968625b1..f7147db1 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -833,6 +833,7 @@ static int download_files(alpm_handle_t *handle, alpm_list_t **deltas)
CALLOC(dpayload, 1, sizeof(*dpayload), RET_ERR(handle, ALPM_ERR_MEMORY, -1));
STRDUP(dpayload->remote_name, delta->delta, RET_ERR(handle, ALPM_ERR_MEMORY, -1));
dpayload->max_size = delta->download_size;
+ dpayload->servers = current->servers;
files = alpm_list_add(files, dpayload);
}
@@ -847,6 +848,7 @@ static int download_files(alpm_handle_t *handle, alpm_list_t **deltas)
CALLOC(payload, 1, sizeof(*payload), RET_ERR(handle, ALPM_ERR_MEMORY, -1));
STRDUP(payload->remote_name, spkg->filename, RET_ERR(handle, ALPM_ERR_MEMORY, -1));
payload->max_size = spkg->size;
+ payload->servers = current->servers;
files = alpm_list_add(files, payload);
}