Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=4f9b8e063fe877aa9d17baf61f4d58d74b5c2b1f

commit 4f9b8e063fe877aa9d17baf61f4d58d74b5c2b1f
Author: Michel Hermier <herm...@frugalware.org>
Date:   Fri Nov 15 09:46:11 2013 +0100

libpacman: Plug libftp callback to a private function in preparation of 
transfer callback changes.

diff --git a/lib/libpacman/server.c b/lib/libpacman/server.c
index 5a874e4..2ac312d 100644
--- a/lib/libpacman/server.c
+++ b/lib/libpacman/server.c
@@ -142,6 +142,12 @@ int _pacman_downloadfiles(pmlist_t *servers, const char 
*localpath, pmlist_t *fi
}
}

+static
+int _pacman_ftplib_download_cb(netbuf *control, int xfered, void *arg)
+{
+       return pm_dlcb(control, xfered, arg);
+}
+
/*
* This is the real downloadfiles, used directly by sync_synctree() to check
* modtimes on remote files.
@@ -230,7 +236,7 @@ int _pacman_downloadfiles_forreal(pmlist_t *servers, const 
char *localpath,
/* set up our progress bar's callback (and idle timeout) */
if(strcmp(server->protocol, "file") && control) {
if(pm_dlcb) {
-                                       FtpOptions(FTPLIB_CALLBACK, 
(long)pm_dlcb, control);
+                                       FtpOptions(FTPLIB_CALLBACK, 
(long)_pacman_ftplib_download_cb, control);
} else {
_pacman_log(PM_LOG_DEBUG, _("downloadfiles: progress bar's callback is not 
set\n"));
}
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to