mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
addr_resolve() rewrite broke { (ipv6enabled == true) name => IPv4 address }
network.c: - addr_resolve(): save AF_UNSPEC ip4 address into ip4, not into to->ip4
This commit is contained in:
parent
36e5636406
commit
2092b5d936
|
@ -744,7 +744,7 @@ int addr_resolve(const char *address, IP *to, IP *extra)
|
||||||
#ifdef TOX_ENABLE_IPV6
|
#ifdef TOX_ENABLE_IPV6
|
||||||
else if (!(rc & 1)) {
|
else if (!(rc & 1)) {
|
||||||
struct sockaddr_in *addr = (struct sockaddr_in *)walker->ai_addr;
|
struct sockaddr_in *addr = (struct sockaddr_in *)walker->ai_addr;
|
||||||
to->ip4.in_addr = addr->sin_addr;
|
ip4.in_addr = addr->sin_addr;
|
||||||
rc |= 1;
|
rc |= 1;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue
Block a user