New option in conffile to set libfetch's limit (seconds) in timed out connections.

This commit is contained in:
Juan RP
2011-06-22 09:53:44 +02:00
parent 6b4aaae971
commit fbfa9c5960
5 changed files with 28 additions and 2 deletions

View File

@ -106,9 +106,14 @@ xbps_fetch_file(const char *uri,
assert(outputdir != NULL);
fetchLastErrCode = 0;
fetchTimeout = 30; /* 30 seconds of timeout */
xhp = xbps_handle_get();
if (xhp->fetch_timeout != 0)
fetchTimeout = xhp->fetch_timeout;
else
fetchTimeout = 30; /* 30s if not set in configuration file. */
/*
* Get the filename specified in URI argument.
*/