Forgot to commit src/PeerReceiveHandshakeCommand.cc

2007-12-25  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>

	Removed incomingPeer. Set 0 to peer's port if it is not a listening
	port.
	* src/DefaultPeerStorage.{h, cc}
	* test/DefaultPeerStorageTest.cc
	* src/HandshakeExtensionMessage.cc
	* test/HandshakeExtensionMessageTest.cc
	* src/Peer.{h, cc}: Added ipaddr and port to identity comparison.
	* src/PeerStorage.h
	* test/MockPeerStorage.h
	* src/PeerListenCommand.cc
	* src/PeerReceiveHandshakeCommand.cc
pull/1/head
Tatsuhiro Tsujikawa 2007-12-25 12:35:54 +00:00
parent f5b68379d5
commit 20eb571ba1
2 changed files with 2 additions and 1 deletions

View File

@ -10,6 +10,7 @@
* src/PeerStorage.h * src/PeerStorage.h
* test/MockPeerStorage.h * test/MockPeerStorage.h
* src/PeerListenCommand.cc * src/PeerListenCommand.cc
* src/PeerReceiveHandshakeCommand.cc
2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com> 2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

View File

@ -77,7 +77,7 @@ bool PeerReceiveHandshakeCommand::executeInternal()
if(!PIECE_STORAGE(btContext)->downloadFinished() && tstat.getDownloadSpeed() < _lowestSpeedLimit || if(!PIECE_STORAGE(btContext)->downloadFinished() && tstat.getDownloadSpeed() < _lowestSpeedLimit ||
BT_RUNTIME(btContext)->getConnections() < MAX_PEERS) { BT_RUNTIME(btContext)->getConnections() < MAX_PEERS) {
peer->reconfigure(btContext->getPieceLength(), btContext->getTotalLength()); peer->reconfigure(btContext->getPieceLength(), btContext->getTotalLength());
if(PEER_STORAGE(btContext)->addIncomingPeer(peer)) { if(PEER_STORAGE(btContext)->addPeer(peer)) {
peer->cuid = cuid; peer->cuid = cuid;