mirror of https://github.com/aria2/aria2
2009-12-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug that RequestGroupMan::downloadFinished() returns true even if all downloads haven't finished, especially when PostDownloadHandler is involved. Changed the condition so that it only returns true if both _requestGroups and _reservedGroups are empty. * src/RequestGroupMan.ccpull/1/head
parent
cd3552fbbb
commit
15c5d12737
|
@ -1,3 +1,12 @@
|
||||||
|
2009-12-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||||
|
|
||||||
|
Fixed the bug that RequestGroupMan::downloadFinished() returns
|
||||||
|
true even if all downloads haven't finished, especially when
|
||||||
|
PostDownloadHandler is involved. Changed the condition so that it
|
||||||
|
only returns true if both _requestGroups and _reservedGroups are
|
||||||
|
empty.
|
||||||
|
* src/RequestGroupMan.cc
|
||||||
|
|
||||||
2009-12-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
2009-12-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||||
|
|
||||||
Log listening port for BitTorrent/DHT in notice level.
|
Log listening port for BitTorrent/DHT in notice level.
|
||||||
|
|
|
@ -91,16 +91,7 @@ bool RequestGroupMan::downloadFinished()
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#endif // ENABLE_XML_RPC
|
#endif // ENABLE_XML_RPC
|
||||||
if(!_reservedGroups.empty()) {
|
return _requestGroups.empty() && _reservedGroups.empty();
|
||||||
return false;
|
|
||||||
}
|
|
||||||
for(RequestGroups::iterator itr = _requestGroups.begin();
|
|
||||||
itr != _requestGroups.end(); ++itr) {
|
|
||||||
if((*itr)->getNumCommand() > 0 || !(*itr)->downloadFinished()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RequestGroupMan::addRequestGroup(const RequestGroupHandle& group)
|
void RequestGroupMan::addRequestGroup(const RequestGroupHandle& group)
|
||||||
|
|
Loading…
Reference in New Issue