2008-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

Use unsigned char for data store.
This commit is contained in:
Tatsuhiro Tsujikawa 2008-03-07 12:05:50 +00:00
parent 7578d5fb22
commit fc0fa4203a
86 changed files with 378 additions and 312 deletions

View file

@ -163,7 +163,7 @@ void DHTMessageFactoryImplTest::testCreateFindNodeReplyMessage()
nodes[i]->setIPAddress("192.168.0."+Util::uitos(i+1));
nodes[i]->setPort(6881+i);
char buf[6];
unsigned char buf[6];
CPPUNIT_ASSERT(PeerMessageUtil::createcompact(buf, nodes[i]->getIPAddress(), nodes[i]->getPort()));
compactNodeInfo +=
std::string(&nodes[i]->getID()[0], &nodes[i]->getID()[DHT_ID_LENGTH])+
@ -232,7 +232,7 @@ void DHTMessageFactoryImplTest::testCreateGetPeersReplyMessage_nodes()
nodes[i]->setIPAddress("192.168.0."+Util::uitos(i+1));
nodes[i]->setPort(6881+i);
char buf[6];
unsigned char buf[6];
CPPUNIT_ASSERT(PeerMessageUtil::createcompact(buf, nodes[i]->getIPAddress(), nodes[i]->getPort()));
compactNodeInfo +=
std::string(&nodes[i]->getID()[0], &nodes[i]->getID()[DHT_ID_LENGTH])+
@ -276,7 +276,7 @@ void DHTMessageFactoryImplTest::testCreateGetPeersReplyMessage_values()
r->put("values", values);
for(size_t i = 0; i < 4; ++i) {
SharedHandle<Peer> peer = new Peer("192.168.0."+Util::uitos(i+1), 6881+i);
char buffer[6];
unsigned char buffer[6];
CPPUNIT_ASSERT(PeerMessageUtil::createcompact(buffer, peer->ipaddr, peer->port));
values->add(new Data(buffer, sizeof(buffer)));
peers.push_back(peer);