summaryrefslogtreecommitdiff
path: root/src/DHTFindNodeReplyMessage.cc
diff options
context:
space:
mode:
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);