Git-Url:
http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2/.git;a=commitdiff;h=2baea21e99cbc582cff9b969002b07ba1743ce1b
commit 2baea21e99cbc582cff9b969002b07ba1743ce1b
Author: VMiklos <[EMAIL PROTECTED]>
Date: Wed Jul 25 00:23:42 2007 +0200
libpacman: if PM_OPT_DLREMAIN and/or PM_OPT_DLHOWMANY is set, make use of them
diff --git a/lib/libpacman/server.c b/lib/libpacman/server.c
index ce86737..066c994 100644
--- a/lib/libpacman/server.c
+++ b/lib/libpacman/server.c
@@ -164,12 +164,19 @@ int _pacman_downloadfiles_forreal(pmlist_t *servers,
const char *localpath,
int done = 0;
pmlist_t *complete = NULL;
pmlist_t *i;
+ int *remain = handle->dlremain, *howmany = handle->dlhowmany;
if(files == NULL) {
return(0);
}
pm_errno = 0;
+ if(howmany) {
+ *howmany = _pacman_list_count(files);
+ }
+ if(remain) {
+ *remain = 0;
+ }
_pacman_log(PM_LOG_DEBUG, _("server check, %d\n"),servers);
for(i = servers; i && !done; i = i->next) {
@@ -238,6 +245,10 @@ int _pacman_downloadfiles_forreal(pmlist_t *servers, const
char *localpath,
continue;
}
+ if(remain) {
+ *remain += 1;
+ }
+
if(handle->xfercommand && strcmp(server->protocol, "file")) {
int ret;
int usepart = 0;
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git