1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-07-01 16:16:46 +02:00

Adapted to ipv6-enabled tox

main.c:
- init_tox(): tox_new() => tox_new(TOX_ENABLE_IPV6_DEFAULT) (enables dual-stack per default)
- resolv_addr(): killed
- init_connection(): use tox_bootstrap_from_address(), which does the resolving

prompt.c:
- cmd_connect(): use tox_bootstrap_from_address(), which does the resolving
This commit is contained in:
Coren[m]
2013-09-15 09:22:23 +02:00
parent 43f7847633
commit f78bca7269
2 changed files with 5 additions and 78 deletions

View File

@ -285,16 +285,9 @@ void cmd_connect(ToxWindow *self, Tox *m, int argc, char **argv)
return;
}
dht.port = htons(atoi(port));
uint32_t resolved_address = resolve_addr(ip);
if (resolved_address == 0) {
return;
}
dht.ip.i = resolved_address;
uint8_t *binary_string = hex_string_to_bin(key);
tox_bootstrap(m, dht, binary_string);
tox_bootstrap_from_address(m, ip, TOX_ENABLE_IPV6_DEFAULT,
htons(atoi(port)), binary_string);
free(binary_string);
}