summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--testing/DHT_test.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/testing/DHT_test.c b/testing/DHT_test.c
index a7c61e7f..29c25e0a 100644
--- a/testing/DHT_test.c
+++ b/testing/DHT_test.c
@@ -26,6 +26,14 @@
26 26
27int main(int argc, char *argv[]) 27int main(int argc, char *argv[])
28{ 28{
29 #ifdef WIN32
30 WSADATA wsaData;
31 if(WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
32 {
33 return -1;
34 }
35 #endif
36
29 if (argc < 3) { 37 if (argc < 3) {
30 printf("usage %s ip port\n", argv[0]); 38 printf("usage %s ip port\n", argv[0]);
31 exit(0); 39 exit(0);
@@ -82,5 +90,9 @@ int main(int argc, char *argv[])
82 } 90 }
83 c_sleep(100); 91 c_sleep(100);
84 } 92 }
93
94 #ifdef WIN32
95 WSACleanup();
96 #endif
85 return 0; 97 return 0;
86} \ No newline at end of file 98} \ No newline at end of file