mirror of https://github.com/aria2/aria2
2007-07-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed the bug that causes segfault when all URIs specified are unsupported. * src/RequestGroupMan.cc (getInitialCommands) Check if RequestGroup::createNextCommand() returns empty list of commands. * src/RequestGroup.cc (createNextCommand) Change log level from info to error so that users can notice that an error occurred. Fixed the bug that causes segfault when a zero-sized file is downloaded. * src/BitfieldMan.cc (isAllBitSet) Return true if bitfieldLength is 0.pull/1/head
parent
eab047dfba
commit
77a3820920
16
ChangeLog
16
ChangeLog
|
@ -1,3 +1,19 @@
|
|||
2007-07-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||
|
||||
Fixed the bug that causes segfault when all URIs specified are
|
||||
unsupported.
|
||||
* src/RequestGroupMan.cc (getInitialCommands)
|
||||
Check if RequestGroup::createNextCommand() returns empty list of
|
||||
commands.
|
||||
* src/RequestGroup.cc (createNextCommand)
|
||||
Change log level from info to error so that users can notice that
|
||||
an error occurred.
|
||||
|
||||
Fixed the bug that causes segfault when a zero-sized file is
|
||||
downloaded.
|
||||
* src/BitfieldMan.cc (isAllBitSet)
|
||||
Return true if bitfieldLength is 0.
|
||||
|
||||
2007-07-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||
|
||||
* src/main.cc
|
||||
|
|
|
@ -458,6 +458,9 @@ bool BitfieldMan::isFilteredAllBitSet() const {
|
|||
}
|
||||
|
||||
bool BitfieldMan::isAllBitSet() const {
|
||||
if(bitfieldLength == 0) {
|
||||
return true;
|
||||
}
|
||||
for(int32_t i = 0; i < bitfieldLength-1; ++i) {
|
||||
if(bitfield[i] != 0xff) {
|
||||
return false;
|
||||
|
|
|
@ -80,8 +80,8 @@ Commands RequestGroup::createNextCommand(DownloadEngine* e, int32_t numCommand,
|
|||
if(req->setUrl(uri)) {
|
||||
commands.push_back(InitiateConnectionCommandFactory::createInitiateConnectionCommand(CUIDCounterSingletonHolder::instance()->newID(), req, this, e));
|
||||
} else {
|
||||
logger->info(_("Unrecognized URL or unsupported protocol: %s\n"),
|
||||
req->getUrl().c_str());
|
||||
logger->error(_("Unrecognized URL or unsupported protocol: %s\n"),
|
||||
req->getUrl().c_str());
|
||||
}
|
||||
}
|
||||
return commands;
|
||||
|
|
|
@ -91,7 +91,10 @@ Commands RequestGroupMan::getInitialCommands(DownloadEngine* e)
|
|||
itr != _requestGroups.end(); ++itr) {
|
||||
(*itr)->initSegmentMan();
|
||||
(*itr)->setGID(++_gidCounter);
|
||||
commands.push_back((*itr)->createNextCommand(e, 1).front());
|
||||
Commands nextCommands = (*itr)->createNextCommand(e, 1);
|
||||
if(!nextCommands.empty()) {
|
||||
commands.push_back(nextCommands.front());
|
||||
}
|
||||
}
|
||||
return commands;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue