mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Fixed a line in DHT.c and clarified something in DHT_test.c.
This commit is contained in:
parent
1837745d96
commit
5d70f9c119
|
@ -573,7 +573,7 @@ int handle_sendnodes(char * packet, uint32_t length, IP_Port source)//tested
|
|||
{
|
||||
return 1;
|
||||
}
|
||||
int num_nodes = (length - 5 - CLIENT_ID_SIZE) / (CLIENT_ID_SIZE + sizeof(IP_Port));
|
||||
uint32_t num_nodes = (length - 5 - CLIENT_ID_SIZE) / (CLIENT_ID_SIZE + sizeof(IP_Port));
|
||||
uint32_t i;
|
||||
uint32_t ping_id;
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
*
|
||||
* Compile with: gcc -Wall -o test ../core/DHT.c DHT_test.c
|
||||
*
|
||||
* Command line arguments are the ip and port of a node
|
||||
* EX: ./test 127.0.0.1 33445
|
||||
* Command line arguments are the ip and port of a node and the client_id of the friend you want to find the ip_port of
|
||||
* EX: ./test 127.0.0.1 33445 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdef
|
||||
*/
|
||||
|
||||
#include "../core/DHT.h"
|
||||
|
@ -93,7 +93,7 @@ int main(int argc, char *argv[])
|
|||
#endif
|
||||
|
||||
if (argc < 4) {
|
||||
printf("usage %s ip port client_id\n", argv[0]);
|
||||
printf("usage %s ip port client_id(of friend to find ip_port of)\n", argv[0]);
|
||||
exit(0);
|
||||
}
|
||||
addfriend(argv[3]);
|
||||
|
|
Loading…
Reference in New Issue
Block a user