Some changes for the XBPS libfetch's frontend code.

1) Raise the cache connection settings to more sane defaults (8->6, 16->2).
2) Introduce xbps_fetch_unset_cache_connection() to drop the caches.
This commit is contained in:
Juan RP
2010-11-03 12:23:57 +01:00
parent 9c60862e0f
commit 8ef8d86c12
3 changed files with 16 additions and 3 deletions

View File

@ -223,14 +223,14 @@ int xbps_cmpver(const char *pkg1, const char *pkg2);
*
* Default (global) limit of cached connections used in libfetch.
*/
#define XBPS_FETCH_CACHECONN 8
#define XBPS_FETCH_CACHECONN 6
/**
* @def XBPS_FETCH_CACHECONN_HOST
*
* Default (per host) limit of cached connections used in libfetch.
*/
#define XBPS_FETCH_CACHECONN_HOST 16
#define XBPS_FETCH_CACHECONN_HOST 2
/**
* Download a file from a remote URL.
@ -259,6 +259,11 @@ int xbps_fetch_file(const char *uri,
*/
void xbps_fetch_set_cache_connection(int global, int per_host);
/**
* Destroys the libfetch's cache connection established.
*/
void xbps_fetch_unset_cache_connection(void);
/**
* Returns last error string reported by xbps_fetch_file().
*