diff options
Diffstat (limited to 'other')
-rw-r--r-- | other/DHT_bootstrap.c | 17 | ||||
-rw-r--r-- | other/cmake/DHT_bootstrap.cmake | 2 |
2 files changed, 3 insertions, 16 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 | { |
diff --git a/other/cmake/DHT_bootstrap.cmake b/other/cmake/DHT_bootstrap.cmake index c3c313ae..e2b164ba 100644 --- a/other/cmake/DHT_bootstrap.cmake +++ b/other/cmake/DHT_bootstrap.cmake | |||
@@ -4,6 +4,6 @@ project(DHT_bootstrap C) | |||
4 | set(exe_name DHT_bootstrap) | 4 | set(exe_name DHT_bootstrap) |
5 | 5 | ||
6 | add_executable(${exe_name} | 6 | add_executable(${exe_name} |
7 | DHT_bootstrap.c) | 7 | DHT_bootstrap.c ../testing/misc_tools.c) |
8 | 8 | ||
9 | linkCoreLibraries(${exe_name}) | 9 | linkCoreLibraries(${exe_name}) |