diff options
Diffstat (limited to 'testing')
-rw-r--r-- | testing/DHT_test.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/testing/DHT_test.c b/testing/DHT_test.c index 799d31ad..4c1a9cd8 100644 --- a/testing/DHT_test.c +++ b/testing/DHT_test.c | |||
@@ -96,9 +96,6 @@ void printpacket(char * data, uint32_t length, IP_Port ip_port) | |||
96 | 96 | ||
97 | int main(int argc, char *argv[]) | 97 | int main(int argc, char *argv[]) |
98 | { | 98 | { |
99 | srand(time(NULL)); | ||
100 | int randdomnum = rand(); | ||
101 | memcpy(self_client_id, &randdomnum, 4); | ||
102 | //memcpy(self_client_id, "qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq", 32); | 99 | //memcpy(self_client_id, "qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq", 32); |
103 | 100 | ||
104 | if (argc < 4) { | 101 | if (argc < 4) { |
@@ -107,12 +104,15 @@ int main(int argc, char *argv[]) | |||
107 | } | 104 | } |
108 | addfriend(argv[3]); | 105 | addfriend(argv[3]); |
109 | 106 | ||
110 | |||
111 | //initialize networking | 107 | //initialize networking |
112 | //bind to ip 0.0.0.0:PORT | 108 | //bind to ip 0.0.0.0:PORT |
113 | IP ip; | 109 | IP ip; |
114 | ip.i = 0; | 110 | ip.i = 0; |
115 | init_networking(ip, PORT); | 111 | init_networking(ip, PORT); |
112 | |||
113 | int randdomnum = random_int(); | ||
114 | memcpy(self_client_id, &randdomnum, 4); | ||
115 | |||
116 | 116 | ||
117 | perror("Initialization"); | 117 | perror("Initialization"); |
118 | IP_Port bootstrap_ip_port; | 118 | IP_Port bootstrap_ip_port; |