diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2009-12-13 07:45:22 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2009-12-13 07:45:22 +0000 |
| commit | 15c5d12737011ce62ce0e2f592106616d5045cad (patch) | |
| tree | 1b6790b5eb9c620ecdf7de4ebe99ea0e49c362d8 | |
| parent | cd3552fbbb3ebed66b06584d225cb08f5f981b78 (diff) | |
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
| -rw-r--r-- | ChangeLog | 9 | ||||
| -rw-r--r-- | src/RequestGroupMan.cc | 11 |
2 files changed, 10 insertions, 10 deletions
@@ -1,5 +1,14 @@ 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. * src/DHTConnectionImpl.cc * src/PeerListenCommand.cc diff --git a/src/RequestGroupMan.cc b/src/RequestGroupMan.cc index d9f4bb35..02bb3070 100644 --- a/src/RequestGroupMan.cc +++ b/src/RequestGroupMan.cc @@ -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) |
