summaryrefslogtreecommitdiff
path: root/toxcore
diff options
context:
space:
mode:
authorCoren[m] <Break@Ocean>2013-09-15 08:20:37 +0200
committerCoren[m] <Break@Ocean>2013-09-15 08:20:37 +0200
commit2092b5d936acd1b69269ace0d22e862790ad57b3 (patch)
tree22a8b1f8d9254461c2b6f9bf667df41195bfb29a /toxcore
parent36e5636406c019390f96c2a02c17c850143d21b9 (diff)
addr_resolve() rewrite broke { (ipv6enabled == true) name => IPv4 address }
network.c: - addr_resolve(): save AF_UNSPEC ip4 address into ip4, not into to->ip4
Diffstat (limited to 'toxcore')
-rw-r--r--toxcore/network.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toxcore/network.c b/toxcore/network.c
index 6ae13160..83081a49 100644
--- a/toxcore/network.c
+++ b/toxcore/network.c
@@ -744,7 +744,7 @@ int addr_resolve(const char *address, IP *to, IP *extra)
744#ifdef TOX_ENABLE_IPV6 744#ifdef TOX_ENABLE_IPV6
745 else if (!(rc & 1)) { 745 else if (!(rc & 1)) {
746 struct sockaddr_in *addr = (struct sockaddr_in *)walker->ai_addr; 746 struct sockaddr_in *addr = (struct sockaddr_in *)walker->ai_addr;
747 to->ip4.in_addr = addr->sin_addr; 747 ip4.in_addr = addr->sin_addr;
748 rc |= 1; 748 rc |= 1;
749 } 749 }
750#endif 750#endif