Преглед на файлове

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
Tatsuhiro Tsujikawa преди 16 години
родител
ревизия
84f02e7dd0
променени са 2 файла, в които са добавени 13 реда и са изтрити 6 реда
  1. 7 0
      ChangeLog
  2. 6 6
      src/RequestGroup.cc

+ 7 - 0
ChangeLog

@@ -1,3 +1,10 @@
+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.

+ 6 - 6
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>