[pacman-dev] [PATCH 2/5] dload: add RO copy of servers list to each payload
Dan McGee
dpmcgee at gmail.com
Sun Oct 16 15:35:11 EDT 2011
On Sun, Oct 16, 2011 at 1:59 PM, Dave Reisner <d at falconindy.com> wrote:
> Signed-off-by: Dave Reisner <dreisner at archlinux.org>
> ---
Nitpicky, but the commit message is a tad misleading- this isn't a
copy but just a pointer, no? So something like "add pointer to server
list for each download payload" might make more sense.
-Dan
> lib/libalpm/dload.h | 1 +
> lib/libalpm/sync.c | 2 ++
> 2 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/lib/libalpm/dload.h b/lib/libalpm/dload.h
> index 27d865d..158e0b7 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 968625b..f7147db 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);
> }
> --
> 1.7.7
>
>
>
More information about the pacman-dev
mailing list