diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-05-13 15:55:05 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-05-13 15:55:05 +0000 |
| commit | 898b807ba2cf2c1ec1e64848c560e9dc09a903ce (patch) | |
| tree | a6e4dcfbcf111d482fd58ce3fdbb266dbad6e094 /src/DHTFindNodeMessage.cc | |
| parent | 5c8db1cc20373213183c00417b2db6544de73462 (diff) | |
2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Made string literal to static const std::string
* src/DHTAbstractMessage.cc
* src/DHTAnnouncePeerMessage.cc
* src/DHTAnnouncePeerMessage.h
* src/DHTAnnouncePeerReplyMessage.cc
* src/DHTAnnouncePeerReplyMessage.h
* src/DHTFindNodeMessage.cc
* src/DHTFindNodeMessage.h
* src/DHTFindNodeReplyMessage.cc
* src/DHTFindNodeReplyMessage.h
* src/DHTGetPeersMessage.cc
* src/DHTGetPeersMessage.h
* src/DHTGetPeersReplyMessage.cc
* src/DHTGetPeersReplyMessage.h
* src/DHTMessage.cc
* src/DHTMessage.h
* src/DHTMessageFactoryImpl.cc
* src/DHTMessageReceiver.cc
* src/DHTPingMessage.cc
* src/DHTPingMessage.h
* src/DHTPingReplyMessage.cc
* src/DHTPingReplyMessage.h
* src/DHTQueryMessage.cc
* src/DHTQueryMessage.h
* src/DHTResponseMessage.cc
* src/DHTResponseMessage.h
* src/DHTUnknownMessage.cc
* src/DHTUnknownMessage.h
Diffstat (limited to 'src/DHTFindNodeMessage.cc')
| -rw-r--r-- | src/DHTFindNodeMessage.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/DHTFindNodeMessage.cc b/src/DHTFindNodeMessage.cc index 951c14e3..f5b0ab2c 100644 --- a/src/DHTFindNodeMessage.cc +++ b/src/DHTFindNodeMessage.cc @@ -45,6 +45,10 @@ namespace aria2 { +const std::string DHTFindNodeMessage::FIND_NODE("find_node"); + +const std::string DHTFindNodeMessage::TARGET_NODE("target"); + DHTFindNodeMessage::DHTFindNodeMessage(const SharedHandle<DHTNode>& localNode, const SharedHandle<DHTNode>& remoteNode, const unsigned char* targetNodeID, @@ -68,16 +72,16 @@ void DHTFindNodeMessage::doReceivedAction() Dictionary* DHTFindNodeMessage::getArgument() { Dictionary* a = new Dictionary(); - a->put("id", new Data(reinterpret_cast<const char*>(_localNode->getID()), + a->put(DHTMessage::ID, new Data(reinterpret_cast<const char*>(_localNode->getID()), DHT_ID_LENGTH)); - a->put("target", new Data(reinterpret_cast<const char*>(_targetNodeID), + a->put(TARGET_NODE, new Data(reinterpret_cast<const char*>(_targetNodeID), DHT_ID_LENGTH)); return a; } std::string DHTFindNodeMessage::getMessageType() const { - return "find_node"; + return FIND_NODE; } void DHTFindNodeMessage::validate() const {} |
