2010-11-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Use --max-connection-per-server option value for Metalink.
	* src/Metalink2RequestGroup.cc
This commit is contained in:
Tatsuhiro Tsujikawa 2010-11-14 08:36:41 +00:00
parent ba540085a6
commit e16844cc8f
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2010-11-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Use --max-connection-per-server option value for Metalink.
* src/Metalink2RequestGroup.cc
2010-11-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed compile error on opensolaris

View File

@ -256,7 +256,8 @@ Metalink2RequestGroup::createRequestGroup
util::applyDir(option->get(PREF_DIR),
entry->file->getPath())));
dctx->getFirstFileEntry()->setUris(uris);
dctx->getFirstFileEntry()->setMaxConnectionPerServer(1);
dctx->getFirstFileEntry()->setMaxConnectionPerServer
(option->getAsInt(PREF_MAX_CONNECTION_PER_SERVER));
if(option->getAsBool(PREF_METALINK_ENABLE_UNIQUE_PROTOCOL)) {
dctx->getFirstFileEntry()->setUniqueProtocol(true);
}
@ -296,7 +297,8 @@ Metalink2RequestGroup::createRequestGroup
(new FileEntry
(util::applyDir(option->get(PREF_DIR), (*i)->file->getPath()),
(*i)->file->getLength(), offset, uris));
fe->setMaxConnectionPerServer(1);
fe->setMaxConnectionPerServer
(option->getAsInt(PREF_MAX_CONNECTION_PER_SERVER));
if(option->getAsBool(PREF_METALINK_ENABLE_UNIQUE_PROTOCOL)) {
fe->setUniqueProtocol(true);
}