diff options
Diffstat (limited to 'testing/DHT_test.c')
-rw-r--r-- | testing/DHT_test.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/testing/DHT_test.c b/testing/DHT_test.c index d14e1577..2e9c2ac2 100644 --- a/testing/DHT_test.c +++ b/testing/DHT_test.c | |||
@@ -30,6 +30,7 @@ | |||
30 | //#include "../core/network.h" | 30 | //#include "../core/network.h" |
31 | #include "../core/DHT.c" | 31 | #include "../core/DHT.c" |
32 | #include "../core/friend_requests.c" | 32 | #include "../core/friend_requests.c" |
33 | #include "misc_tools.h" | ||
33 | 34 | ||
34 | #include <string.h> | 35 | #include <string.h> |
35 | 36 | ||
@@ -114,22 +115,6 @@ void printpacket(uint8_t * data, uint32_t length, IP_Port ip_port) | |||
114 | printf("\n--------------------END-----------------------------\n\n\n"); | 115 | printf("\n--------------------END-----------------------------\n\n\n"); |
115 | } | 116 | } |
116 | 117 | ||
117 | //TODO: rewrite | ||
118 | unsigned char * hex_string_to_bin(char hex_string[]) | ||
119 | { | ||
120 | size_t len = strlen(hex_string); | ||
121 | unsigned char * val = malloc(len); | ||
122 | char * pos = hex_string; | ||
123 | int i=0; | ||
124 | while(i < len) | ||
125 | { | ||
126 | sscanf(pos,"%2hhx",&val[i]); | ||
127 | pos+=2; | ||
128 | i++; | ||
129 | } | ||
130 | return val; | ||
131 | } | ||
132 | |||
133 | int main(int argc, char *argv[]) | 118 | int main(int argc, char *argv[]) |
134 | { | 119 | { |
135 | //memcpy(self_client_id, "qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq", 32); | 120 | //memcpy(self_client_id, "qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq", 32); |