summaryrefslogtreecommitdiff
path: root/src/PeerInteractionCommand.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-07-04 22:35:41 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-07-04 22:35:41 +0900
commitc6a733378ff38e0a4f846250cee82f555bff151a (patch)
tree2ea1dff05ebd414396945beb31308cdfb3bfb0ba /src/PeerInteractionCommand.cc
parent0cdeaa817783bfd74fddbc84079812b0ce77dfe1 (diff)
Use std::unique_ptr to receive BtMessage
Diffstat (limited to 'src/PeerInteractionCommand.cc')
-rw-r--r--src/PeerInteractionCommand.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/PeerInteractionCommand.cc b/src/PeerInteractionCommand.cc
index bddd81d5..6ef89187 100644
--- a/src/PeerInteractionCommand.cc
+++ b/src/PeerInteractionCommand.cc
@@ -47,6 +47,7 @@
#include "DownloadContext.h"
#include "Peer.h"
#include "BtMessage.h"
+#include "BtHandshakeMessage.h"
#include "BtRuntime.h"
#include "PeerStorage.h"
#include "DefaultBtMessageDispatcher.h"
@@ -327,8 +328,7 @@ bool PeerInteractionCommand::executeInternal() {
break;
}
}
- std::shared_ptr<BtMessage> handshakeMessage =
- btInteractive_->receiveHandshake();
+ auto handshakeMessage = btInteractive_->receiveHandshake();
if(!handshakeMessage) {
done = true;
break;
@@ -338,8 +338,7 @@ bool PeerInteractionCommand::executeInternal() {
break;
}
case RECEIVER_WAIT_HANDSHAKE: {
- std::shared_ptr<BtMessage> handshakeMessage =
- btInteractive_->receiveAndSendHandshake();
+ auto handshakeMessage = btInteractive_->receiveAndSendHandshake();
if(!handshakeMessage) {
done = true;
break;