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
pull/1/head
Tatsuhiro Tsujikawa 2009-12-13 07:45:22 +00:00
parent cd3552fbbb
commit 15c5d12737
2 changed files with 10 additions and 10 deletions

View File

@ -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>
Log listening port for BitTorrent/DHT in notice level.

View File

@ -91,16 +91,7 @@ bool RequestGroupMan::downloadFinished()
return false;
}
#endif // ENABLE_XML_RPC
if(!_reservedGroups.empty()) {
return false;
}
for(RequestGroups::iterator itr = _requestGroups.begin();
itr != _requestGroups.end(); ++itr) {
if((*itr)->getNumCommand() > 0 || !(*itr)->downloadFinished()) {
return false;
}
}
return true;
return _requestGroups.empty() && _reservedGroups.empty();
}
void RequestGroupMan::addRequestGroup(const RequestGroupHandle& group)