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:
Coren[m] 2013-09-15 08:20:37 +02:00
parent 36e5636406
commit 2092b5d936

View File

@ -744,7 +744,7 @@ int addr_resolve(const char *address, IP *to, IP *extra)
#ifdef TOX_ENABLE_IPV6
else if (!(rc & 1)) {
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;
}
#endif