summaryrefslogtreecommitdiff
path: root/src/DHTFindNodeReplyMessage.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-06-19 17:54:54 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-06-19 17:54:54 +0000
commitcb4e25e4b4a2cfa6349a25586a44c932022e6841 (patch)
tree15c0713df0ca88784a0c95a466e3a846192f290b /src/DHTFindNodeReplyMessage.cc
parent8ba97188ce42be38b5427e9bd70bb7f5ba8238f9 (diff)
2010-06-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed BDE and bencode
Diffstat (limited to 'src/DHTFindNodeReplyMessage.cc')
-rw-r--r--src/DHTFindNodeReplyMessage.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/DHTFindNodeReplyMessage.cc b/src/DHTFindNodeReplyMessage.cc
index 99542623..bdd186ef 100644
--- a/src/DHTFindNodeReplyMessage.cc
+++ b/src/DHTFindNodeReplyMessage.cc
@@ -44,7 +44,6 @@
#include "DHTMessageCallback.h"
#include "bittorrent_helper.h"
#include "util.h"
-#include "bencode.h"
namespace aria2 {
@@ -70,10 +69,10 @@ void DHTFindNodeReplyMessage::doReceivedAction()
}
}
-BDE DHTFindNodeReplyMessage::getResponse()
+SharedHandle<Dict> DHTFindNodeReplyMessage::getResponse()
{
- BDE aDict = BDE::dict();
- aDict[DHTMessage::ID] = BDE(getLocalNode()->getID(), DHT_ID_LENGTH);
+ SharedHandle<Dict> aDict = Dict::g();
+ aDict->put(DHTMessage::ID, String::g(getLocalNode()->getID(), DHT_ID_LENGTH));
size_t offset = 0;
unsigned char buffer[DHTBucket::K*26];
// TODO if _closestKNodes.size() > DHTBucket::K ??
@@ -87,7 +86,7 @@ BDE DHTFindNodeReplyMessage::getResponse()
offset += 26;
}
}
- aDict[NODES] = BDE(buffer, offset);
+ aDict->put(NODES, String::g(buffer, offset));
return aDict;
}