summaryrefslogtreecommitdiff
path: root/test/DefaultBtMessageDispatcherTest.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2007-12-26 14:26:55 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2007-12-26 14:26:55 +0000
commite39f7a7e9ce1e42e7a46332f664d6a6810ee55fa (patch)
tree602f80960c3538968b234725b4e7cdfb5c79ff4d /test/DefaultBtMessageDispatcherTest.cc
parenteed41706fc0e72c15b0509f6a93b03644cc06c59 (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/DefaultBtMessageDispatcherTest.cc')
-rw-r--r--test/DefaultBtMessageDispatcherTest.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/test/DefaultBtMessageDispatcherTest.cc b/test/DefaultBtMessageDispatcherTest.cc
index f21ae2e5..ef9b36d5 100644
--- a/test/DefaultBtMessageDispatcherTest.cc
+++ b/test/DefaultBtMessageDispatcherTest.cc
@@ -129,9 +129,7 @@ public:
void setUp() {
btContext = new DefaultBtContext();
btContext->load("test.torrent");
- peer = new Peer("192.168.0.1", 6969,
- btContext->getPieceLength(),
- btContext->getTotalLength());
+ peer = new Peer("192.168.0.1", 6969);
peerStorage = new MockPeerStorage();
pieceStorage = new MockPieceStorage();
BtRegistry::unregisterAll();