diff options
author | Aaron Griffin <aaron@archlinux.org> | 2006-11-20 09:10:23 +0000 |
---|---|---|
committer | Aaron Griffin <aaron@archlinux.org> | 2006-11-20 09:10:23 +0000 |
commit | aa1c0ba9f8787fc3b1a1190103e394b0c1c95922 (patch) | |
tree | ed0c9675f7fc5da043a69b36e0b8c6c8e05cb583 /lib/libalpm/server.c | |
parent | b8b9596b13de957566211b0e1db3e473ed66e147 (diff) | |
download | pacman-aa1c0ba9f8787fc3b1a1190103e394b0c1c95922.tar.xz |
* repo-add script - to add entries to a db file directly from package data (no PKGBUILD)
* libalpm api changes - move from a _getinfo(p, WHAT_WE_WANT) scheme to a
typesafe _get_what_we_want(p) scheme [not 100% complete yet]
* some const correctness changes
* removal of PM_* types in alpm.h in favor of the pm*_t types used throughout
libalpm
Diffstat (limited to 'lib/libalpm/server.c')
-rw-r--r-- | lib/libalpm/server.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/libalpm/server.c b/lib/libalpm/server.c index 4c0b5e79..90466e32 100644 --- a/lib/libalpm/server.c +++ b/lib/libalpm/server.c @@ -38,8 +38,6 @@ #include "handle.h" #include "log.h" -download_progress_cb pm_dlcb = NULL; - pmserver_t *_alpm_server_new(const char *url) { struct url *u; @@ -172,10 +170,10 @@ int _alpm_downloadfiles_forreal(pmlist_t *servers, const char *localpath, downloadTimeout = 10000; /* Make libdownload super verbose... worthwhile for testing */ - if(pm_logmask & PM_LOG_DOWNLOAD) { + if(alpm_option_get_logmask() & PM_LOG_DOWNLOAD) { downloadDebug = 1; } - if(pm_logmask & PM_LOG_DEBUG) { + if(alpm_option_get_logmask() & PM_LOG_DEBUG) { dlf = downloadXGet(server->s_url, &ust, (handle->nopassiveftp ? "v" : "vp")); } else { dlf = downloadXGet(server->s_url, &ust, (handle->nopassiveftp ? "" : "p")); @@ -229,7 +227,7 @@ int _alpm_downloadfiles_forreal(pmlist_t *servers, const char *localpath, } /* Progress 0 - initialize */ - if(pm_dlcb) pm_dlcb(fn, 0, ust.size); + if(handle->dlcb) handle->dlcb(fn, 0, ust.size); int nread = 0; char buffer[PM_DLBUF_LEN]; @@ -238,7 +236,7 @@ int _alpm_downloadfiles_forreal(pmlist_t *servers, const char *localpath, while((nwritten += fwrite(buffer, 1, (nread - nwritten), localf)) < nread) ; dltotal_bytes += nread; - if(pm_dlcb) pm_dlcb(fn, dltotal_bytes, ust.size); + if(handle->dlcb) handle->dlcb(fn, dltotal_bytes, ust.size); } fclose(localf); |