diff options
author | irungentoo <irungentoo@gmail.com> | 2013-06-25 17:50:30 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2013-06-25 17:50:30 -0400 |
commit | 5d70f9c119d1ca9ff5ab1b6500cbc62b76936775 (patch) | |
tree | 5d6e73fde7ee3121b3797e15030f969a039c6568 | |
parent | 1837745d96f98827c0fb4f0db920cd29c20260c0 (diff) |
Fixed a line in DHT.c and clarified something in DHT_test.c.
-rw-r--r-- | core/DHT.c | 2 | ||||
-rw-r--r-- | testing/DHT_test.c | 6 |
2 files changed, 4 insertions, 4 deletions
@@ -573,7 +573,7 @@ int handle_sendnodes(char * packet, uint32_t length, IP_Port source)//tested | |||
573 | { | 573 | { |
574 | return 1; | 574 | return 1; |
575 | } | 575 | } |
576 | int num_nodes = (length - 5 - CLIENT_ID_SIZE) / (CLIENT_ID_SIZE + sizeof(IP_Port)); | 576 | uint32_t num_nodes = (length - 5 - CLIENT_ID_SIZE) / (CLIENT_ID_SIZE + sizeof(IP_Port)); |
577 | uint32_t i; | 577 | uint32_t i; |
578 | uint32_t ping_id; | 578 | uint32_t ping_id; |
579 | 579 | ||
diff --git a/testing/DHT_test.c b/testing/DHT_test.c index 59b0233e..6bf4e4f2 100644 --- a/testing/DHT_test.c +++ b/testing/DHT_test.c | |||
@@ -3,8 +3,8 @@ | |||
3 | * | 3 | * |
4 | * Compile with: gcc -Wall -o test ../core/DHT.c DHT_test.c | 4 | * Compile with: gcc -Wall -o test ../core/DHT.c DHT_test.c |
5 | * | 5 | * |
6 | * Command line arguments are the ip and port of a node | 6 | * 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 |
7 | * EX: ./test 127.0.0.1 33445 | 7 | * EX: ./test 127.0.0.1 33445 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdef |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include "../core/DHT.h" | 10 | #include "../core/DHT.h" |
@@ -93,7 +93,7 @@ int main(int argc, char *argv[]) | |||
93 | #endif | 93 | #endif |
94 | 94 | ||
95 | if (argc < 4) { | 95 | if (argc < 4) { |
96 | printf("usage %s ip port client_id\n", argv[0]); | 96 | printf("usage %s ip port client_id(of friend to find ip_port of)\n", argv[0]); |
97 | exit(0); | 97 | exit(0); |
98 | } | 98 | } |
99 | addfriend(argv[3]); | 99 | addfriend(argv[3]); |