mirror of
https://github.com/irssi/irssi.git
synced 2024-09-08 04:26:01 -04:00
net_gethostbyname() fix for ipv6.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2357 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
3801628b44
commit
f2a4a97668
@ -407,6 +407,7 @@ int net_gethostbyname(const char *addr, IPADDR *ip4, IPADDR *ip6)
|
||||
while (ai != NULL && count < 2) {
|
||||
so = (union sockaddr_union *) ai->ai_addr;
|
||||
|
||||
if (so != NULL) {
|
||||
if (ai->ai_family == AF_INET6 && ip6->family == 0) {
|
||||
sin_get_ip(so, ip6);
|
||||
count++;
|
||||
@ -414,6 +415,7 @@ int net_gethostbyname(const char *addr, IPADDR *ip4, IPADDR *ip6)
|
||||
sin_get_ip(so, ip4);
|
||||
count++;
|
||||
}
|
||||
}
|
||||
ai = ai->ai_next;
|
||||
}
|
||||
freeaddrinfo(origai);
|
||||
|
Loading…
Reference in New Issue
Block a user