diff options
Diffstat (limited to 'other')
-rw-r--r-- | other/DHT_bootstrap.c | 4 | ||||
-rw-r--r-- | other/bootstrap_serverdaemon/DHT_bootstrap_daemon.c | 9 |
2 files changed, 7 insertions, 6 deletions
diff --git a/other/DHT_bootstrap.c b/other/DHT_bootstrap.c index 4a91679c..5d97b37a 100644 --- a/other/DHT_bootstrap.c +++ b/other/DHT_bootstrap.c | |||
@@ -44,7 +44,7 @@ | |||
44 | 44 | ||
45 | 45 | ||
46 | 46 | ||
47 | void manage_keys(DHT * dht) | 47 | void manage_keys(DHT *dht) |
48 | { | 48 | { |
49 | const uint32_t KEYS_SIZE = crypto_box_PUBLICKEYBYTES + crypto_box_SECRETKEYBYTES; | 49 | const uint32_t KEYS_SIZE = crypto_box_PUBLICKEYBYTES + crypto_box_SECRETKEYBYTES; |
50 | uint8_t keys[KEYS_SIZE]; | 50 | uint8_t keys[KEYS_SIZE]; |
@@ -85,7 +85,7 @@ int main(int argc, char *argv[]) | |||
85 | //bind to ip 0.0.0.0:PORT | 85 | //bind to ip 0.0.0.0:PORT |
86 | IP ip; | 86 | IP ip; |
87 | ip.i = 0; | 87 | ip.i = 0; |
88 | DHT * dht = new_DHT(new_net_crypto(new_networking(ip, PORT))); | 88 | DHT *dht = new_DHT(new_net_crypto(new_networking(ip, PORT))); |
89 | init_cryptopackets(dht); | 89 | init_cryptopackets(dht); |
90 | manage_keys(dht); | 90 | manage_keys(dht); |
91 | printf("Public key: "); | 91 | printf("Public key: "); |
diff --git a/other/bootstrap_serverdaemon/DHT_bootstrap_daemon.c b/other/bootstrap_serverdaemon/DHT_bootstrap_daemon.c index 8eb1530b..81ac538b 100644 --- a/other/bootstrap_serverdaemon/DHT_bootstrap_daemon.c +++ b/other/bootstrap_serverdaemon/DHT_bootstrap_daemon.c | |||
@@ -77,7 +77,7 @@ and connect to them. | |||
77 | returns 1 if the connection to the DHT is up | 77 | returns 1 if the connection to the DHT is up |
78 | returns -1 if all attempts failed | 78 | returns -1 if all attempts failed |
79 | */ | 79 | */ |
80 | int connect_to_servers(DHT * dht, struct server_info_s *info) | 80 | int connect_to_servers(DHT *dht, struct server_info_s *info) |
81 | { | 81 | { |
82 | int i; | 82 | int i; |
83 | int c; | 83 | int c; |
@@ -115,7 +115,7 @@ int connect_to_servers(DHT * dht, struct server_info_s *info) | |||
115 | return 0; | 115 | return 0; |
116 | } | 116 | } |
117 | 117 | ||
118 | void manage_keys(DHT * dht, char *keys_file) | 118 | void manage_keys(DHT *dht, char *keys_file) |
119 | { | 119 | { |
120 | const uint32_t KEYS_SIZE = crypto_box_PUBLICKEYBYTES + crypto_box_SECRETKEYBYTES; | 120 | const uint32_t KEYS_SIZE = crypto_box_PUBLICKEYBYTES + crypto_box_SECRETKEYBYTES; |
121 | uint8_t keys[KEYS_SIZE]; | 121 | uint8_t keys[KEYS_SIZE]; |
@@ -293,13 +293,14 @@ int main(int argc, char *argv[]) | |||
293 | printf("Please specify a configuration file.\n"); | 293 | printf("Please specify a configuration file.\n"); |
294 | exit(EXIT_FAILURE); | 294 | exit(EXIT_FAILURE); |
295 | } | 295 | } |
296 | |||
296 | server_conf = configure_server(argv[1]); | 297 | server_conf = configure_server(argv[1]); |
297 | 298 | ||
298 | /* initialize networking | 299 | /* initialize networking |
299 | bind to ip 0.0.0.0:PORT */ | 300 | bind to ip 0.0.0.0:PORT */ |
300 | IP ip; | 301 | IP ip; |
301 | ip.i = 0; | 302 | ip.i = 0; |
302 | DHT * dht = new_DHT(new_net_crypto(new_networking(ip, server_conf.port))); | 303 | DHT *dht = new_DHT(new_net_crypto(new_networking(ip, server_conf.port))); |
303 | /* Read the config file */ | 304 | /* Read the config file */ |
304 | printf("PID file: %s\n", server_conf.pid_file); | 305 | printf("PID file: %s\n", server_conf.pid_file); |
305 | printf("Key file: %s\n", server_conf.keys_file); | 306 | printf("Key file: %s\n", server_conf.keys_file); |