mirror of https://github.com/aria2/aria2
2008-10-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Changed the type of _numNewConnection to unsigned int. * src/ActivePeerConnectionCommand.cc * src/ActivePeerConnectionCommand.hpull/1/head
parent
7f288acbe0
commit
1b0ce6e765
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue