summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2009-01-31 13:01:25 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2009-01-31 13:01:25 +0000
commit84f02e7dd06d6dcfa4de83aa2dff652a4d74ce3e (patch)
tree3a8fe9baf0e9f3bd29b3b14ce74133196b61193d
parentdbc8f687c17a634d7f66bf70101708f08d460acf (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--ChangeLog7
-rw-r--r--src/RequestGroup.cc12
2 files changed, 13 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index ff03353e..e2baa12c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>