2008-08-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

Fixed the bug that commands are created more than the number of	
pieces.
	* src/RequestGroup.cc
This commit is contained in:
Tatsuhiro Tsujikawa 2008-08-27 15:02:21 +00:00
parent 01ae2bc912
commit 58ad225655
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2008-08-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed the bug that commands are created more than the number of pieces.
* src/RequestGroup.cc
2008-08-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed infinite loop bug in FTP when SIZE command failed.

View File

@ -491,9 +491,9 @@ void RequestGroup::createNextCommandWithAdj(std::deque<Command*>& commands,
} else {
numCommand = _numConcurrentCommand;
}
numCommand += numAdj;
numCommand = std::min(static_cast<int>(_downloadContext->getNumPieces()),
numCommand);
numCommand += numAdj;
}
if(numCommand > 0) {
createNextCommand(commands, e, numCommand);