Explorar el Código

2008-10-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

	Changed the type of _numNewConnection to unsigned int.
	* src/ActivePeerConnectionCommand.cc
	* src/ActivePeerConnectionCommand.h
Tatsuhiro Tsujikawa hace 17 años
padre
commit
1b0ce6e765
Se han modificado 3 ficheros con 9 adiciones y 3 borrados
  1. 6 0
      ChangeLog
  2. 2 2
      src/ActivePeerConnectionCommand.cc
  3. 1 1
      src/ActivePeerConnectionCommand.h

+ 6 - 0
ChangeLog

@@ -1,3 +1,9 @@
+2008-10-06  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
+
+	Changed the type of _numNewConnection to unsigned int.
+	* src/ActivePeerConnectionCommand.cc
+	* src/ActivePeerConnectionCommand.h
+
 2008-10-06  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
 	* Release 0.16.0

+ 2 - 2
src/ActivePeerConnectionCommand.cc

@@ -89,11 +89,11 @@ bool ActivePeerConnectionCommand::execute() {
        (!pieceStorage->downloadFinished() &&
 	(tstat.getDownloadSpeed() < _thresholdSpeed ||
 	 btRuntime->lessThanMinPeers()))) {
-      size_t numConnection = pieceStorage->downloadFinished() ?
+      unsigned int numConnection = pieceStorage->downloadFinished() ?
 	std::min(_numNewConnection,
 		 BtRuntime::MAX_PEERS-btRuntime->getConnections()) :
 	_numNewConnection;
-      for(size_t numAdd = numConnection;
+      for(unsigned int numAdd = numConnection;
 	  numAdd > 0 && peerStorage->isPeerAvailable(); --numAdd) {
 	PeerHandle peer = peerStorage->getUnusedPeer();
 	connectToPeer(peer);

+ 1 - 1
src/ActivePeerConnectionCommand.h

@@ -55,7 +55,7 @@ private:
   Time checkPoint;
   unsigned int _thresholdSpeed; // UNIT: byte/sec
   unsigned int _maxUploadSpeedLimit;
-  size_t _numNewConnection; // the number of the connection to establish.
+  unsigned int _numNewConnection; // the number of the connection to establish.
 public:
   ActivePeerConnectionCommand(int cuid,
 			      RequestGroup* requestGroup,