diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-06-08 15:02:20 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-06-08 15:02:20 +0000 |
| commit | 9afc36152a1ce428243a3ace608d0508716a2efb (patch) | |
| tree | 2e144d04570a058f3e2716d7b98f16803392cdbe /src/LpdReceiveMessageCommand.cc | |
| parent | 7cd9b21937c42606354610c7ae85a0857b474cf5 (diff) | |
2010-06-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Made protected member variables of Command private. Added accessor
funcs.
Diffstat (limited to 'src/LpdReceiveMessageCommand.cc')
| -rw-r--r-- | src/LpdReceiveMessageCommand.cc | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/src/LpdReceiveMessageCommand.cc b/src/LpdReceiveMessageCommand.cc index b067e760..7bc14be5 100644 --- a/src/LpdReceiveMessageCommand.cc +++ b/src/LpdReceiveMessageCommand.cc @@ -94,17 +94,18 @@ bool LpdReceiveMessageCommand::execute() SharedHandle<DownloadContext> dctx = reg->getDownloadContext(m->getInfoHash()); if(dctx.isNull()) { - if(logger->debug()) { - logger->debug("Download Context is null for infohash=%s.", - util::toHex(m->getInfoHash()).c_str()); + if(getLogger()->debug()) { + getLogger()->debug("Download Context is null for infohash=%s.", + util::toHex(m->getInfoHash()).c_str()); } continue; } const BDE& torrentAttrs = dctx->getAttribute(bittorrent::BITTORRENT); if(torrentAttrs.containsKey(bittorrent::PRIVATE)) { if(torrentAttrs[bittorrent::PRIVATE].i() == 1) { - if(logger->debug()) { - logger->debug("Ignore LPD message because the torrent is private."); + if(getLogger()->debug()) { + getLogger()->debug + ("Ignore LPD message because the torrent is private."); } continue; } @@ -117,16 +118,16 @@ bool LpdReceiveMessageCommand::execute() assert(!peerStorage.isNull()); SharedHandle<Peer> peer = m->getPeer(); if(peerStorage->addPeer(peer)) { - if(logger->debug()) { - logger->debug("LPD peer %s:%u local=%d added.", - peer->ipaddr.c_str(), peer->port, - peer->isLocalPeer()?1:0); + if(getLogger()->debug()) { + getLogger()->debug("LPD peer %s:%u local=%d added.", + peer->ipaddr.c_str(), peer->port, + peer->isLocalPeer()?1:0); } } else { - if(logger->debug()) { - logger->debug("LPD peer %s:%u local=%d not added.", - peer->ipaddr.c_str(), peer->port, - peer->isLocalPeer()?1:0); + if(getLogger()->debug()) { + getLogger()->debug("LPD peer %s:%u local=%d not added.", + peer->ipaddr.c_str(), peer->port, + peer->isLocalPeer()?1:0); } } } |
