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:
11
src/prompt.c
11
src/prompt.c
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user