From 3986206de89f7094ba1300e72a7a46916bae7ff4 Mon Sep 17 00:00:00 2001 From: irungentoo Date: Thu, 27 Jun 2013 17:19:09 -0400 Subject: Added a function. --- testing/DHT_test.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'testing') 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) int main(int argc, char *argv[]) { - srand(time(NULL)); - int randdomnum = rand(); - memcpy(self_client_id, &randdomnum, 4); //memcpy(self_client_id, "qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq", 32); if (argc < 4) { @@ -107,12 +104,15 @@ int main(int argc, char *argv[]) } addfriend(argv[3]); - //initialize networking //bind to ip 0.0.0.0:PORT IP ip; ip.i = 0; init_networking(ip, PORT); + + int randdomnum = random_int(); + memcpy(self_client_id, &randdomnum, 4); + perror("Initialization"); IP_Port bootstrap_ip_port; -- cgit v1.2.3