Ver Fonte

2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

	Fixed the bug that HAVE message is not sent for a piece they are
	downloaded fom http/ftp server before any BitTorrent handshake 
is done
	with peers.
	* src/DefaultBtInteractive.cc
Tatsuhiro Tsujikawa há 17 anos atrás
pai
commit
897ab7321f
2 ficheiros alterados com 9 adições e 2 exclusões
  1. 7 0
      ChangeLog
  2. 2 2
      src/DefaultBtInteractive.cc

+ 7 - 0
ChangeLog

@@ -1,3 +1,10 @@
+2008-02-27  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
+
+	Fixed the bug that HAVE message is not sent for a piece they are
+	downloaded fom http/ftp server before any BitTorrent handshake is done
+	with peers.
+	* src/DefaultBtInteractive.cc
+
 2008-02-27  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
 	Removed RequestInfo.h and FileAllocator.h since they have been removed.

+ 2 - 2
src/DefaultBtInteractive.cc

@@ -127,8 +127,8 @@ BtMessageHandle DefaultBtInteractive::receiveAndSendHandshake() {
 }
 
 void DefaultBtInteractive::doPostHandshakeProcessing() {
-  // TODO where is the valid place to rest haveCheckTime?
-  haveCheckPoint.reset();
+  // Set time 0 to haveCheckPoint to cache http/ftp download piece completion
+  haveCheckPoint.setTimeInSec(0);
   keepAliveCheckPoint.reset();
   floodingCheckPoint.reset();
   _pexCheckPoint.setTimeInSec(0);