From e39f7a7e9ce1e42e7a46332f664d6a6810ee55fa Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Wed, 26 Dec 2007 14:26:55 +0000 Subject: 2007-12-26 Tatsuhiro Tsujikawa 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 --- test/BtRejectMessageTest.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/BtRejectMessageTest.cc') diff --git a/test/BtRejectMessageTest.cc b/test/BtRejectMessageTest.cc index ed46ea6f..73bfb163 100644 --- a/test/BtRejectMessageTest.cc +++ b/test/BtRejectMessageTest.cc @@ -66,7 +66,7 @@ public: void setUp() { BtRegistry::unregisterAll(); - peer = new Peer("host", 6969, 16*1024, 256*1024); + peer = new Peer("host", 6969); MockBtContextHandle btContext = new MockBtContext(); btContext->setInfoHash((const unsigned char*)"12345678901234567890"); -- cgit