Add defs for default fetch cache connection limits and use them in

xbps_fetch_cache_connection() if 0 is passed as argument.

xbps-bin: enable fetch cached connection when downloading binpkgs.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20100124153156-4updprik11nwi7c1
This commit is contained in:
Juan RP
2010-01-24 16:31:56 +01:00
parent 801785cbab
commit 088baa7699
3 changed files with 23 additions and 7 deletions

View File

@@ -58,9 +58,6 @@ struct xferstat {
const char *name;
};
static int cache_connections = 8;
static int cache_connections_host = 16;
/*
* Compute and display ETA
*/
@@ -197,9 +194,9 @@ void
xbps_fetch_set_cache_connection(int global, int per_host)
{
if (global == 0)
global = cache_connections;
global = XBPS_FETCH_CACHECONN;
if (per_host == 0)
per_host = cache_connections_host;
per_host = XBPS_FETCH_CACHECONN_HOST;
fetchConnectionCacheInit(global, per_host);
}