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 /test/BtPieceMessageTest.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 'test/BtPieceMessageTest.cc')
| -rw-r--r-- | test/BtPieceMessageTest.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/BtPieceMessageTest.cc b/test/BtPieceMessageTest.cc index 22f78b1b..f82dc6fe 100644 --- a/test/BtPieceMessageTest.cc +++ b/test/BtPieceMessageTest.cc @@ -80,7 +80,7 @@ public: btContext->setPieceLength(16*1024); btContext->setTotalLength(256*1024); - peer = new Peer("host", 6969, 16*1024, 256*1024); + peer = new Peer("host", 6969); BtRegistry::registerPeerObjectCluster(btContext->getInfoHashAsString(), new PeerObjectCluster()); PEER_OBJECT_CLUSTER(btContext)->registerHandle(peer->getId(), new PeerObject()); |
