diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-01-05 16:01:46 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-01-05 16:01:46 +0000 |
| commit | 4db349c1f32b4a313d12d114137432441633d00a (patch) | |
| tree | 417451971e264834312cfd8339c79930d680a5d1 /src/PeerReceiveHandshakeCommand.cc | |
| parent | 338e8aca09331d3e7fa4e1e8e1f9d10260986772 (diff) | |
2010-01-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Untabify. Fixed one line in copyright which is longer than 80
columns.
* src
* test
Diffstat (limited to 'src/PeerReceiveHandshakeCommand.cc')
| -rw-r--r-- | src/PeerReceiveHandshakeCommand.cc | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/PeerReceiveHandshakeCommand.cc b/src/PeerReceiveHandshakeCommand.cc index 337cd5ec..d4bd1942 100644 --- a/src/PeerReceiveHandshakeCommand.cc +++ b/src/PeerReceiveHandshakeCommand.cc @@ -16,7 +16,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * In addition, as a special exception, the copyright holders give * permission to link the code of portions of this program with the @@ -97,8 +97,8 @@ bool PeerReceiveHandshakeCommand::executeInternal() e->getBtRegistry()->getDownloadContext(infoHash); if(downloadContext.isNull()) { throw DL_ABORT_EX - (StringFormat("Unknown info hash %s", - util::toHex(infoHash).c_str()).str()); + (StringFormat("Unknown info hash %s", + util::toHex(infoHash).c_str()).str()); } BtObject btObject = e->getBtRegistry()->get (downloadContext->getOwnerRequestGroup()->getGID()); @@ -107,8 +107,8 @@ bool PeerReceiveHandshakeCommand::executeInternal() SharedHandle<PeerStorage> peerStorage = btObject._peerStorage; if(!btRuntime->ready()) { throw DL_ABORT_EX - (StringFormat("Unknown info hash %s", - util::toHex(infoHash).c_str()).str()); + (StringFormat("Unknown info hash %s", + util::toHex(infoHash).c_str()).str()); } TransferStat tstat = @@ -123,26 +123,26 @@ bool PeerReceiveHandshakeCommand::executeInternal() } if((!pieceStorage->downloadFinished() && - tstat.getDownloadSpeed() < thresholdSpeed) || + tstat.getDownloadSpeed() < thresholdSpeed) || btRuntime->lessThanMaxPeers()) { if(peerStorage->addPeer(peer)) { - peer->usedBy(cuid); - - PeerInteractionCommand* command = - new PeerInteractionCommand - (cuid, - downloadContext->getOwnerRequestGroup(), - peer, - e, - btRuntime, - pieceStorage, - peerStorage, - socket, - PeerInteractionCommand::RECEIVER_WAIT_HANDSHAKE, - _peerConnection); - e->commands.push_back(command); - logger->debug(MSG_INCOMING_PEER_CONNECTION, cuid, peer->usedBy()); + peer->usedBy(cuid); + + PeerInteractionCommand* command = + new PeerInteractionCommand + (cuid, + downloadContext->getOwnerRequestGroup(), + peer, + e, + btRuntime, + pieceStorage, + peerStorage, + socket, + PeerInteractionCommand::RECEIVER_WAIT_HANDSHAKE, + _peerConnection); + e->commands.push_back(command); + logger->debug(MSG_INCOMING_PEER_CONNECTION, cuid, peer->usedBy()); } } return true; |
