summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDave Reisner <d@falconindy.com>2011-01-12 09:51:06 -0500
committerDave Reisner <d@falconindy.com>2011-03-09 15:22:32 -0500
commit159e1b06a50c7e80171d88933698f107a7f5773a (patch)
treeeb0b21e13197aa056e909c0efb797c2e6c2d10ea /lib
parent278c84710637a891c3407c3811f61b181359ea75 (diff)
downloadpacman-159e1b06a50c7e80171d88933698f107a7f5773a.tar.xz
prefix fetch based functions with fetch_
Do this in preparation for implementing similar curl based functionality. We want the ability to test these side by side. Signed-off-by: Dave Reisner <d@falconindy.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/dload.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c
index afe0dd40..4109e451 100644
--- a/lib/libalpm/dload.c
+++ b/lib/libalpm/dload.c
@@ -80,7 +80,7 @@ static char *get_tempfile(const char *path, const char *filename) {
return(tempfile);
}
-static const char *gethost(struct url *fileurl)
+static const char *fetch_gethost(struct url *fileurl)
{
const char *host = _("disk");
if(strcmp(SCHEME_FILE, fileurl->scheme) != 0) {
@@ -98,7 +98,7 @@ static void inthandler(int signum)
#define check_stop() if(dload_interrupted) { ret = -1; goto cleanup; }
enum sighandlers { OLD = 0, NEW = 1 };
-static int download_internal(const char *url, const char *localpath,
+static int fetch_download_internal(const char *url, const char *localpath,
int force) {
FILE *localf = NULL;
struct stat st;
@@ -191,7 +191,7 @@ static int download_internal(const char *url, const char *localpath,
if(fetchStat(fileurl, &ust, "") == -1) {
pm_errno = PM_ERR_LIBFETCH;
_alpm_log(PM_LOG_ERROR, _("failed retrieving file '%s' from %s : %s\n"),
- filename, gethost(fileurl), fetchLastErrString);
+ filename, fetch_gethost(fileurl), fetchLastErrString);
ret = -1;
goto cleanup;
}
@@ -221,7 +221,7 @@ static int download_internal(const char *url, const char *localpath,
if(fetchLastErrCode != 0 || dlf == NULL) {
pm_errno = PM_ERR_LIBFETCH;
_alpm_log(PM_LOG_ERROR, _("failed retrieving file '%s' from %s : %s\n"),
- filename, gethost(fileurl), fetchLastErrString);
+ filename, fetch_gethost(fileurl), fetchLastErrString);
ret = -1;
goto cleanup;
} else {
@@ -279,7 +279,7 @@ static int download_internal(const char *url, const char *localpath,
/* not PM_ERR_LIBFETCH here because libfetch error string might be empty */
pm_errno = PM_ERR_RETRIEVE;
_alpm_log(PM_LOG_ERROR, _("failed retrieving file '%s' from %s\n"),
- filename, gethost(fileurl));
+ filename, fetch_gethost(fileurl));
ret = -1;
goto cleanup;
}
@@ -352,7 +352,7 @@ static int download(const char *url, const char *localpath,
int force) {
if(handle->fetchcb == NULL) {
#ifdef HAVE_LIBFETCH
- return(download_internal(url, localpath, force));
+ return(fetch_download_internal(url, localpath, force));
#else
RET_ERR(PM_ERR_EXTERNAL_DOWNLOAD, -1);
#endif