mirror of https://github.com/aria2/aria2
2009-07-05 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed resolved TODO1.5 * src/AbstractCommand.cc * src/DownloadCommand.cc * src/RequestGroup.ccpull/1/head
parent
e40d6b7c0f
commit
d28a3081f3
|
@ -1,3 +1,10 @@
|
|||
2009-07-05 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Removed resolved TODO1.5
|
||||
* src/AbstractCommand.cc
|
||||
* src/DownloadCommand.cc
|
||||
* src/RequestGroup.cc
|
||||
|
||||
2009-07-05 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Release pooled and in-flight Request objectsand URIResult objects
|
||||
|
|
|
@ -283,8 +283,6 @@ void AbstractCommand::onAbort() {
|
|||
if(!_requestGroup->getPieceStorage().isNull()) {
|
||||
_requestGroup->getSegmentMan()->cancelSegment(cuid);
|
||||
}
|
||||
// TODO1.5 Should be moved to FileEntry
|
||||
// _requestGroup->removeIdenticalURI(req->getUrl());
|
||||
}
|
||||
|
||||
void AbstractCommand::disableReadCheckSocket() {
|
||||
|
|
|
@ -289,7 +289,6 @@ bool DownloadCommand::prepareForNextSegment() {
|
|||
if(!tempSegment->complete()) {
|
||||
return prepareForRetry(0);
|
||||
}
|
||||
// TODO1.5 get segment for the same file only
|
||||
SegmentHandle nextSegment =
|
||||
_requestGroup->getSegmentMan()->getSegment(cuid,
|
||||
tempSegment->getIndex()+1);
|
||||
|
|
|
@ -587,42 +587,6 @@ void RequestGroup::createNextCommand(std::deque<Command*>& commands,
|
|||
DownloadEngine* e,
|
||||
unsigned int numCommand)
|
||||
{
|
||||
// TODO1.5 The following block should be moved into FileEntry
|
||||
// if(_option->getAsBool(PREF_REUSE_URI) && _uris.empty()) {
|
||||
// std::deque<std::string> uris = _spentUris;
|
||||
// std::sort(uris.begin(), uris.end());
|
||||
// uris.erase(std::unique(uris.begin(), uris.end()), uris.end());
|
||||
|
||||
// std::deque<std::string> errorUris(_uriResults.size());
|
||||
// std::transform(_uriResults.begin(), _uriResults.end(),
|
||||
// errorUris.begin(), std::mem_fun_ref(&URIResult::getURI));
|
||||
// std::sort(errorUris.begin(), errorUris.end());
|
||||
// errorUris.erase(std::unique(errorUris.begin(), errorUris.end()),
|
||||
// errorUris.end());
|
||||
|
||||
// std::deque<std::string> reusableURIs;
|
||||
// std::set_difference(uris.begin(), uris.end(),
|
||||
// errorUris.begin(), errorUris.end(),
|
||||
// std::back_inserter(reusableURIs));
|
||||
// size_t ininum = reusableURIs.size();
|
||||
// _logger->debug("Found %u reusable URIs",
|
||||
// static_cast<unsigned int>(ininum));
|
||||
// // Reuse at least _numConcurrentCommand URIs here to avoid to
|
||||
// // run this process repeatedly.
|
||||
// if(ininum > 0 && ininum < _numConcurrentCommand) {
|
||||
// _logger->debug("fewer than _numConcurrentCommand=%u",
|
||||
// _numConcurrentCommand);
|
||||
// for(size_t i = 0; i < _numConcurrentCommand/ininum; ++i) {
|
||||
// _uris.insert(_uris.end(), reusableURIs.begin(), reusableURIs.end());
|
||||
// }
|
||||
// _uris.insert(_uris.end(), reusableURIs.begin(),
|
||||
// reusableURIs.begin()+(_numConcurrentCommand%ininum));
|
||||
// _logger->debug("Duplication complete: now %u URIs for reuse",
|
||||
// static_cast<unsigned int>(_uris.size()));
|
||||
// }
|
||||
// }
|
||||
// std::deque<std::string> pendingURIs;
|
||||
|
||||
for(; numCommand--; ) {
|
||||
Command* command = new CreateRequestCommand(e->newCUID(), this, e);
|
||||
commands.push_back(command);
|
||||
|
|
Loading…
Reference in New Issue