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

@ -31,14 +31,14 @@ void DHTPingReplyMessageTest::testGetBencodedMessage()
SharedHandle<DHTNode> localNode = new DHTNode();
SharedHandle<DHTNode> remoteNode = new DHTNode();
char tid[DHT_TRANSACTION_ID_LENGTH];
unsigned char tid[DHT_TRANSACTION_ID_LENGTH];
DHTUtil::generateRandomData(tid, DHT_TRANSACTION_ID_LENGTH);
std::string transactionID(&tid[0], &tid[DHT_TRANSACTION_ID_LENGTH]);
char id[DHT_ID_LENGTH];
unsigned char id[DHT_ID_LENGTH];
DHTUtil::generateRandomData(id, DHT_ID_LENGTH);
DHTPingReplyMessage msg(localNode, remoteNode, (const unsigned char*)id, transactionID);
DHTPingReplyMessage msg(localNode, remoteNode, id, transactionID);
std::string msgbody = msg.getBencodedMessage();