summaryrefslogtreecommitdiff
path: root/src/PeerInitiateConnectionCommand.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-02-28 12:30:11 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-02-28 12:30:11 +0000
commitc342bde9627b434effbc0cd10b817670d1da0923 (patch)
tree60d14bf448066b8dcd639adfa0db716d5a8258c8 /src/PeerInitiateConnectionCommand.cc
parent135f0a2a8c4ee04a5e96d84ba558245fabfc1f5c (diff)
2010-02-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Use vector instead of deque for containers which is used for mostly read-only purpose.
Diffstat (limited to 'src/PeerInitiateConnectionCommand.cc')
-rw-r--r--src/PeerInitiateConnectionCommand.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/PeerInitiateConnectionCommand.cc b/src/PeerInitiateConnectionCommand.cc
index 6cbf9479..c6e783e9 100644
--- a/src/PeerInitiateConnectionCommand.cc
+++ b/src/PeerInitiateConnectionCommand.cc
@@ -54,7 +54,7 @@ namespace aria2 {
PeerInitiateConnectionCommand::PeerInitiateConnectionCommand
(int cuid,
RequestGroup* requestGroup,
- const PeerHandle& peer,
+ const SharedHandle<Peer>& peer,
DownloadEngine* e,
const SharedHandle<BtRuntime>& btRuntime,
bool mseHandshakeEnabled)
@@ -99,7 +99,7 @@ bool PeerInitiateConnectionCommand::executeInternal() {
// TODO this method removed when PeerBalancerCommand is implemented
bool PeerInitiateConnectionCommand::prepareForNextPeer(time_t wait) {
if(_peerStorage->isPeerAvailable() && _btRuntime->lessThanEqMinPeers()) {
- PeerHandle peer = _peerStorage->getUnusedPeer();
+ SharedHandle<Peer> peer = _peerStorage->getUnusedPeer();
peer->usedBy(e->newCUID());
PeerInitiateConnectionCommand* command =
new PeerInitiateConnectionCommand(peer->usedBy(), _requestGroup, peer, e,