summaryrefslogtreecommitdiff
path: root/src/PeerReceiveHandshakeCommand.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-06-22 01:10:38 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-06-22 01:10:38 +0900
commit07d270c87e6f9184aea4ca17eb26e466712e8db2 (patch)
tree2dfbaa2e0d2ad0f38cb73098608f7d67a64320f8 /src/PeerReceiveHandshakeCommand.cc
parent126a4bde612eb0e6c48cf2f13ebe3eac45cc71a8 (diff)
Require -std=c++11 and use std::shared_ptr instead of SharedHandle
Diffstat (limited to 'src/PeerReceiveHandshakeCommand.cc')
-rw-r--r--src/PeerReceiveHandshakeCommand.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/PeerReceiveHandshakeCommand.cc b/src/PeerReceiveHandshakeCommand.cc
index b93e049d..5cdd51c3 100644
--- a/src/PeerReceiveHandshakeCommand.cc
+++ b/src/PeerReceiveHandshakeCommand.cc
@@ -63,10 +63,10 @@ namespace aria2 {
PeerReceiveHandshakeCommand::PeerReceiveHandshakeCommand
(cuid_t cuid,
- const SharedHandle<Peer>& peer,
+ const std::shared_ptr<Peer>& peer,
DownloadEngine* e,
- const SharedHandle<SocketCore>& s,
- const SharedHandle<PeerConnection>& peerConnection)
+ const std::shared_ptr<SocketCore>& s,
+ const std::shared_ptr<PeerConnection>& peerConnection)
: PeerAbstractCommand(cuid, peer, e, s),
peerConnection_(peerConnection)
{
@@ -102,19 +102,19 @@ bool PeerReceiveHandshakeCommand::executeInternal()
// check info_hash
std::string infoHash(&data[28], &data[28+INFO_HASH_LENGTH]);
- SharedHandle<DownloadContext> downloadContext =
+ std::shared_ptr<DownloadContext> downloadContext =
getDownloadEngine()->getBtRegistry()->getDownloadContext(infoHash);
if(!downloadContext) {
throw DL_ABORT_EX
(fmt("Unknown info hash %s",
util::toHex(infoHash).c_str()));
}
- const SharedHandle<BtObject>& btObject =
+ const std::shared_ptr<BtObject>& btObject =
getDownloadEngine()->getBtRegistry()->get
(downloadContext->getOwnerRequestGroup()->getGID());
- const SharedHandle<BtRuntime>& btRuntime = btObject->btRuntime;
- const SharedHandle<PieceStorage>& pieceStorage = btObject->pieceStorage;
- const SharedHandle<PeerStorage>& peerStorage = btObject->peerStorage;
+ const std::shared_ptr<BtRuntime>& btRuntime = btObject->btRuntime;
+ const std::shared_ptr<PieceStorage>& pieceStorage = btObject->pieceStorage;
+ const std::shared_ptr<PeerStorage>& peerStorage = btObject->peerStorage;
if(!btRuntime->ready()) {
throw DL_ABORT_EX
(fmt("Unknown info hash %s",