diff options
Diffstat (limited to 'other/bootstrap_serverdaemon/DHT_bootstrap_daemon.c')
-rw-r--r-- | other/bootstrap_serverdaemon/DHT_bootstrap_daemon.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/other/bootstrap_serverdaemon/DHT_bootstrap_daemon.c b/other/bootstrap_serverdaemon/DHT_bootstrap_daemon.c index 0ef1f314..890085cc 100644 --- a/other/bootstrap_serverdaemon/DHT_bootstrap_daemon.c +++ b/other/bootstrap_serverdaemon/DHT_bootstrap_daemon.c | |||
@@ -305,7 +305,12 @@ struct server_conf_s configure_server(char *cfg_file) | |||
305 | printf("bootstrap_server %d: Invalid port.\n", i); | 305 | printf("bootstrap_server %d: Invalid port.\n", i); |
306 | } | 306 | } |
307 | 307 | ||
308 | #ifdef TOX_ENABLE_IPV6 | ||
309 | server_conf.info[i].conn.ip.family = AF_INET; | ||
310 | server_conf.info[i].conn.ip.ip4.uint32 = resolve_addr(strcpy(tmp_ip, bs_ip)); | ||
311 | #else | ||
308 | server_conf.info[i].conn.ip.uint32 = resolve_addr(strcpy(tmp_ip, bs_ip)); | 312 | server_conf.info[i].conn.ip.uint32 = resolve_addr(strcpy(tmp_ip, bs_ip)); |
313 | #endif | ||
309 | server_conf.info[i].conn.port = htons(bs_port); | 314 | server_conf.info[i].conn.port = htons(bs_port); |
310 | b16_to_key(strcpy(tmp_pk, bs_pk), bs_pk_p); | 315 | b16_to_key(strcpy(tmp_pk, bs_pk), bs_pk_p); |
311 | } | 316 | } |
@@ -344,7 +349,7 @@ int main(int argc, char *argv[]) | |||
344 | /* Initialize networking | 349 | /* Initialize networking |
345 | bind to ip 0.0.0.0:PORT */ | 350 | bind to ip 0.0.0.0:PORT */ |
346 | IP ip; | 351 | IP ip; |
347 | ip.uint32 = 0; | 352 | ip_init(&ip, 0); |
348 | DHT *dht = new_DHT(new_net_crypto(new_networking(ip, server_conf.port))); | 353 | DHT *dht = new_DHT(new_net_crypto(new_networking(ip, server_conf.port))); |
349 | /* Read the config file */ | 354 | /* Read the config file */ |
350 | printf("PID file: %s\n", server_conf.pid_file); | 355 | printf("PID file: %s\n", server_conf.pid_file); |