summaryrefslogtreecommitdiff
path: root/src/PeerReceiveHandshakeCommand.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-11-12 12:48:48 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-11-12 12:48:48 +0000
commit93e5dbed325f29c1bf867a2847d3b839d545cfb2 (patch)
treef657b55b41a05cf364403a36edf9d0921f426e7d /src/PeerReceiveHandshakeCommand.cc
parentf6f5a7e5eeec4f14418fec5a7be1bbe57a7ea7e1 (diff)
2010-11-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed SharedHandle::isNull(). Instead we added operator* and operator unspecified_bool_type. Removed use of WeakHandle and replaced with raw pointer.
Diffstat (limited to 'src/PeerReceiveHandshakeCommand.cc')
-rw-r--r--src/PeerReceiveHandshakeCommand.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/PeerReceiveHandshakeCommand.cc b/src/PeerReceiveHandshakeCommand.cc
index a6886009..0d1bfef5 100644
--- a/src/PeerReceiveHandshakeCommand.cc
+++ b/src/PeerReceiveHandshakeCommand.cc
@@ -72,7 +72,7 @@ PeerReceiveHandshakeCommand::PeerReceiveHandshakeCommand
PeerAbstractCommand(cuid, peer, e, s),
peerConnection_(peerConnection)
{
- if(peerConnection_.isNull()) {
+ if(!peerConnection_) {
peerConnection_.reset(new PeerConnection(cuid, getPeer(), getSocket()));
}
}
@@ -99,7 +99,7 @@ bool PeerReceiveHandshakeCommand::executeInternal()
SharedHandle<DownloadContext> downloadContext =
getDownloadEngine()->getBtRegistry()->getDownloadContext(infoHash);
- if(downloadContext.isNull()) {
+ if(!downloadContext) {
throw DL_ABORT_EX
(StringFormat("Unknown info hash %s",
util::toHex(infoHash).c_str()).str());