diff options
Diffstat (limited to 'toxcore/DHT.c')
-rw-r--r-- | toxcore/DHT.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/toxcore/DHT.c b/toxcore/DHT.c index 7663b1cc..1798ea1a 100644 --- a/toxcore/DHT.c +++ b/toxcore/DHT.c | |||
@@ -978,14 +978,17 @@ void DHT_bootstrap(DHT *dht, IP_Port ip_port, uint8_t *public_key) | |||
978 | getnodes(dht, ip_port, public_key, dht->c->self_public_key); | 978 | getnodes(dht, ip_port, public_key, dht->c->self_public_key); |
979 | send_ping_request(dht->ping, dht->c, ip_port, public_key); | 979 | send_ping_request(dht->ping, dht->c, ip_port, public_key); |
980 | } | 980 | } |
981 | void DHT_bootstrap_ex(DHT *dht, const char *address, uint8_t ipv6enabled, uint16_t port, uint8_t *public_key) | 981 | int DHT_bootstrap_ex(DHT *dht, const char *address, uint8_t ipv6enabled, uint16_t port, uint8_t *public_key) |
982 | { | 982 | { |
983 | IP_Port ip_port; | 983 | IP_Port ip_port; |
984 | ip_init(&ip_port.ip, ipv6enabled); | 984 | ip_init(&ip_port.ip, ipv6enabled); |
985 | if (addr_resolve_or_parse_ip(address, &ip_port.ip)) { | 985 | if (addr_resolve_or_parse_ip(address, &ip_port.ip)) { |
986 | ip_port.port = port; | 986 | ip_port.port = port; |
987 | DHT_bootstrap(dht, ip_port, public_key); | 987 | DHT_bootstrap(dht, ip_port, public_key); |
988 | return 1; | ||
988 | } | 989 | } |
990 | else | ||
991 | return 0; | ||
989 | } | 992 | } |
990 | 993 | ||
991 | /* Send the given packet to node with client_id | 994 | /* Send the given packet to node with client_id |