diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2009-01-31 13:01:25 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2009-01-31 13:01:25 +0000 |
| commit | 84f02e7dd06d6dcfa4de83aa2dff652a4d74ce3e (patch) | |
| tree | 3a8fe9baf0e9f3bd29b3b14ce74133196b61193d | |
| parent | dbc8f687c17a634d7f66bf70101708f08d460acf (diff) | |
2009-01-31 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug that the average speed is wrong in
http/ftp/BitTorrent integrated download. Only the download bytes
in BitTorrent were considered.
* src/RequestGroup.cc
| -rw-r--r-- | ChangeLog | 7 | ||||
| -rw-r--r-- | src/RequestGroup.cc | 12 |
2 files changed, 13 insertions, 6 deletions
@@ -1,5 +1,12 @@ 2009-01-31 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net> + Fixed the bug that the average speed is wrong in + http/ftp/BitTorrent integrated download. Only the download bytes + in BitTorrent were considered. + * src/RequestGroup.cc + +2009-01-31 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net> + Choose port for BitTorrent/DHT randomly from the specified range. * src/DHTConnectionImpl.cc * src/PeerListenCommand.cc diff --git a/src/RequestGroup.cc b/src/RequestGroup.cc index 30c9572e..9e246446 100644 --- a/src/RequestGroup.cc +++ b/src/RequestGroup.cc @@ -895,14 +895,14 @@ DownloadResultHandle RequestGroup::createDownloadResult() const #ifdef ENABLE_BITTORRENT if(!_peerStorage.isNull()) { - sessionDownloadLength = + sessionDownloadLength += _peerStorage->calculateStat().getSessionDownloadLength(); - } else + } #endif // ENABLE_BITTORRENT - if(!_segmentMan.isNull()) { - sessionDownloadLength = - _segmentMan->calculateSessionDownloadLength(); - } + if(!_segmentMan.isNull()) { + sessionDownloadLength += + _segmentMan->calculateSessionDownloadLength(); + } return SharedHandle<DownloadResult> |
