mirror of https://github.com/aria2/aria2
2008-08-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed: numCommand is less than the value specified in -C option. * src/RequestGroup.ccpull/1/head
parent
326d11bc46
commit
2283c5ee14
|
@ -1,3 +1,8 @@
|
||||||
|
2008-08-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||||
|
|
||||||
|
Fixed: numCommand is less than the value specified in -C option.
|
||||||
|
* src/RequestGroup.cc
|
||||||
|
|
||||||
2008-08-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
2008-08-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||||
|
|
||||||
Fixed occasional assertion failure in PieceSegment.
|
Fixed occasional assertion failure in PieceSegment.
|
||||||
|
|
|
@ -486,12 +486,13 @@ void RequestGroup::createNextCommandWithAdj(std::deque<Command*>& commands,
|
||||||
numCommand = 1+numAdj;
|
numCommand = 1+numAdj;
|
||||||
} else {
|
} else {
|
||||||
if(_numConcurrentCommand == 0) {
|
if(_numConcurrentCommand == 0) {
|
||||||
numCommand = std::min(_downloadContext->getNumPieces(), _uris.size());
|
numCommand = _uris.size();
|
||||||
} else {
|
} else {
|
||||||
numCommand = std::min(_downloadContext->getNumPieces(),
|
numCommand = _numConcurrentCommand;
|
||||||
_numConcurrentCommand);
|
|
||||||
}
|
}
|
||||||
numCommand += numAdj;
|
numCommand += numAdj;
|
||||||
|
numCommand = std::min(static_cast<int>(_downloadContext->getNumPieces()),
|
||||||
|
numCommand);
|
||||||
}
|
}
|
||||||
if(numCommand > 0) {
|
if(numCommand > 0) {
|
||||||
createNextCommand(commands, e, numCommand);
|
createNextCommand(commands, e, numCommand);
|
||||||
|
|
Loading…
Reference in New Issue