diff options
Diffstat (limited to 'other/DHT_bootstrap.c')
-rw-r--r-- | other/DHT_bootstrap.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/other/DHT_bootstrap.c b/other/DHT_bootstrap.c index 8942c237..19714e70 100644 --- a/other/DHT_bootstrap.c +++ b/other/DHT_bootstrap.c | |||
@@ -29,6 +29,7 @@ | |||
29 | 29 | ||
30 | #include "../core/DHT.h" | 30 | #include "../core/DHT.h" |
31 | #include "../core/friend_requests.h" | 31 | #include "../core/friend_requests.h" |
32 | #include "../testing/misc_tools.h" | ||
32 | 33 | ||
33 | //Sleep function (x = milliseconds) | 34 | //Sleep function (x = milliseconds) |
34 | #ifdef WIN32 | 35 | #ifdef WIN32 |
@@ -41,21 +42,7 @@ | |||
41 | 42 | ||
42 | #define PORT 33445 | 43 | #define PORT 33445 |
43 | 44 | ||
44 | //TODO: rewrite | 45 | |
45 | unsigned char * hex_string_to_bin(char hex_string[]) | ||
46 | { | ||
47 | size_t len = strlen(hex_string); | ||
48 | unsigned char * val = malloc(len); | ||
49 | char * pos = hex_string; | ||
50 | int i=0; | ||
51 | while(i < len) | ||
52 | { | ||
53 | sscanf(pos,"%2hhx",&val[i]); | ||
54 | pos+=2; | ||
55 | i++; | ||
56 | } | ||
57 | return val; | ||
58 | } | ||
59 | 46 | ||
60 | void manage_keys() | 47 | void manage_keys() |
61 | { | 48 | { |