Use xfcd->cookie to pass user-supplied data to the fetch cb.

This commit is contained in:
Juan RP
2011-07-27 18:04:38 +02:00
parent 508f119bc9
commit 43b841dce1
5 changed files with 28 additions and 18 deletions

View File

@ -88,6 +88,7 @@ int
main(int argc, char **argv)
{
struct xbps_handle *xhp;
struct xferstat xfer;
prop_dictionary_t pkgd;
const char *rootdir, *cachedir, *conffile;
int c, rv = 0;
@ -135,6 +136,7 @@ main(int argc, char **argv)
}
xhp->debug = debug;
xhp->xbps_fetch_cb = fetch_file_progress_cb;
xhp->xfcd->cookie = &xfer;
xhp->rootdir = rootdir;
xhp->cachedir = cachedir;
xhp->conffile = conffile;