summaryrefslogtreecommitdiff
path: root/src/DHTFindNodeReplyMessage.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2008-03-07 12:05:50 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2008-03-07 12:05:50 +0000
commitfc0fa4203a0295e69f5101838dded603fc48b9e4 (patch)
treefea885ef0bd8b2b526bab5c5420cdfa3c5a9fd1e /src/DHTFindNodeReplyMessage.cc
parent7578d5fb2299a7b818728c040bf91c4d076406db (diff)
2008-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Use unsigned char for data store.
Diffstat (limited to 'src/DHTFindNodeReplyMessage.cc')
-rw-r--r--src/DHTFindNodeReplyMessage.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/DHTFindNodeReplyMessage.cc b/src/DHTFindNodeReplyMessage.cc
index 8e5534ed..67570618 100644
--- a/src/DHTFindNodeReplyMessage.cc
+++ b/src/DHTFindNodeReplyMessage.cc
@@ -66,10 +66,10 @@ void DHTFindNodeReplyMessage::doReceivedAction()
Dictionary* DHTFindNodeReplyMessage::getResponse()
{
Dictionary* a = new Dictionary();
- a->put("id", new Data(reinterpret_cast<const char*>(_localNode->getID()),
- DHT_ID_LENGTH));
+ a->put("id", new Data(_localNode->getID(), DHT_ID_LENGTH));
size_t offset = 0;
- char buffer[DHTBucket::K*26];
+ unsigned char buffer[DHTBucket::K*26];
+ // TODO if _closestKNodes.size() > DHTBucket::K ??
for(std::deque<SharedHandle<DHTNode> >::const_iterator i = _closestKNodes.begin(); i != _closestKNodes.end(); ++i) {
SharedHandle<DHTNode> node = *i;
memcpy(buffer+offset, node->getID(), DHT_ID_LENGTH);