diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2007-12-26 14:26:55 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2007-12-26 14:26:55 +0000 |
| commit | e39f7a7e9ce1e42e7a46332f664d6a6810ee55fa (patch) | |
| tree | 602f80960c3538968b234725b4e7cdfb5c79ff4d /src/PeerReceiveHandshakeCommand.cc | |
| parent | eed41706fc0e72c15b0509f6a93b03644cc06c59 (diff) | |
2007-12-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Allocate bitfield in Peer when it is really used. More
specifically,
bitfield in Peer is allocated after the connection is
established and
deallocated when the connection is dropped.
Since 2 parameters(piece length and total length) was removed
from the
constructor of Peer class, many test classes were modified
accordingly.
See svn log for more detailed information.
* src/PeerInteractionCommand.cc
* src/CompactPeerListProcessor.cc
* src/Peer.cc
* src/DefaultPeerListProcessor.cc
* src/PeerListenCommand.cc
* src/PeerReceiveHandshakeCommand.cc
Fixed memory leak
* src/Piece.cc
Diffstat (limited to 'src/PeerReceiveHandshakeCommand.cc')
| -rw-r--r-- | src/PeerReceiveHandshakeCommand.cc | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/PeerReceiveHandshakeCommand.cc b/src/PeerReceiveHandshakeCommand.cc index b1282e3f..fc6db478 100644 --- a/src/PeerReceiveHandshakeCommand.cc +++ b/src/PeerReceiveHandshakeCommand.cc @@ -76,7 +76,6 @@ bool PeerReceiveHandshakeCommand::executeInternal() TransferStat tstat = PEER_STORAGE(btContext)->calculateStat(); if(!PIECE_STORAGE(btContext)->downloadFinished() && tstat.getDownloadSpeed() < _lowestSpeedLimit || BT_RUNTIME(btContext)->getConnections() < MAX_PEERS) { - peer->reconfigure(btContext->getPieceLength(), btContext->getTotalLength()); if(PEER_STORAGE(btContext)->addPeer(peer)) { peer->cuid = cuid; |
