summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2013-06-24 17:41:19 -0400
committerirungentoo <irungentoo@gmail.com>2013-06-24 17:41:19 -0400
commitb792e3d6ad4ec26ba35f58afdd97e7a94d4207bb (patch)
tree60ca6e58b5b5e98d18fbe57314cb63ee00fa3fe1 /testing
parentaf1b3b7f9b3e669f1c8f5db095d9de1d2ccde256 (diff)
Updated DHT_test with WSA stuff.
Diffstat (limited to 'testing')
-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