summaryrefslogtreecommitdiff
path: root/other/DHT_bootstrap.c
diff options
context:
space:
mode:
Diffstat (limited to 'other/DHT_bootstrap.c')
-rw-r--r--other/DHT_bootstrap.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/other/DHT_bootstrap.c b/other/DHT_bootstrap.c
index 8942c237..61901a15 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 "../core/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
45unsigned 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
60void manage_keys() 47void manage_keys()
61{ 48{