mirror of
https://github.com/aria2/aria2.git
synced 2025-04-05 05:27:38 +03:00
2008-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Use unsigned char for data store.
This commit is contained in:
parent
7578d5fb22
commit
fc0fa4203a
86 changed files with 378 additions and 312 deletions
|
@ -51,7 +51,7 @@ void DHTFindNodeMessageTest::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]);
|
||||
|
||||
|
@ -67,8 +67,8 @@ void DHTFindNodeMessageTest::testGetBencodedMessage()
|
|||
cm->put("q", new Data("find_node"));
|
||||
Dictionary* a = new Dictionary();
|
||||
cm->put("a", a);
|
||||
a->put("id", new Data(reinterpret_cast<const char*>(localNode->getID()), DHT_ID_LENGTH));
|
||||
a->put("target", new Data(reinterpret_cast<const char*>(targetNode->getID()), DHT_ID_LENGTH));
|
||||
a->put("id", new Data(localNode->getID(), DHT_ID_LENGTH));
|
||||
a->put("target", new Data(targetNode->getID(), DHT_ID_LENGTH));
|
||||
|
||||
BencodeVisitor v;
|
||||
cm->accept(&v);
|
||||
|
@ -81,7 +81,7 @@ void DHTFindNodeMessageTest::testDoReceivedAction()
|
|||
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]);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue