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

Changed the type of _numNewConnection to unsigned int.
	* src/ActivePeerConnectionCommand.cc
	* src/ActivePeerConnectionCommand.h
pull/1/head
Tatsuhiro Tsujikawa 2008-10-06 14:01:40 +00:00
parent 7f288acbe0
commit 1b0ce6e765
3 changed files with 9 additions and 3 deletions

View File

@ -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

View File

@ -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);

View File

@ -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,