mirror of https://github.com/aria2/aria2
2010-03-08 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug that FillRequestGroupCommand is not invoked when RequestGroupMan::createInitialCommand() creates no Command object. * src/FillRequestGroupCommand.cc * src/RequestGroupMan.ccpull/1/head
parent
2c2d19d5d5
commit
587be5119c
|
@ -1,3 +1,10 @@
|
|||
2010-03-08 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Fixed the bug that FillRequestGroupCommand is not invoked when
|
||||
RequestGroupMan::createInitialCommand() creates no Command object.
|
||||
* src/FillRequestGroupCommand.cc
|
||||
* src/RequestGroupMan.cc
|
||||
|
||||
2010-03-08 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Added debug logs.
|
||||
|
|
|
@ -64,10 +64,16 @@ bool FillRequestGroupCommand::execute()
|
|||
SharedHandle<RequestGroupMan> rgman = _e->_requestGroupMan;
|
||||
if(rgman->queueCheckRequested()) {
|
||||
try {
|
||||
rgman->fillRequestGroupFromReserver(_e);
|
||||
// During adding RequestGroup,
|
||||
// RequestGroupMan::requestQueueCheck() might be called, so
|
||||
// first clear it here.
|
||||
rgman->clearQueueCheck();
|
||||
rgman->fillRequestGroupFromReserver(_e);
|
||||
} catch(RecoverableException& ex) {
|
||||
logger->error(EX_EXCEPTION_CAUGHT, ex);
|
||||
// Re-request queue check to fulfill the requests of all
|
||||
// downloads, some might come after this exception.
|
||||
rgman->requestQueueCheck();
|
||||
}
|
||||
if(rgman->downloadFinished()) {
|
||||
return true;
|
||||
|
|
|
@ -516,6 +516,9 @@ void RequestGroupMan::fillRequestGroupFromReserver(DownloadEngine* e)
|
|||
configureRequestGroup(groupToAdd);
|
||||
createInitialCommand(groupToAdd, commands, e);
|
||||
groupToAdd->setRequestGroupMan(this);
|
||||
if(commands.empty()) {
|
||||
requestQueueCheck();
|
||||
}
|
||||
_requestGroups.push_back(groupToAdd);
|
||||
++count;
|
||||
e->addCommand(commands);
|
||||
|
|
Loading…
Reference in New Issue