summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-05-25 17:12:44 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-05-25 17:12:44 +0000
commit64810700e25fa7bcb6377d25a3953d6fc529779f (patch)
treea478b895f1ba489384cef6b625e1236e6aa77e6e /src
parent555a2bf929e6a76609fc06f97de47a731d511f95 (diff)
downloadirssi-64810700e25fa7bcb6377d25a3953d6fc529779f.zip
Didn't compile with IPv6 support.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@242 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r--src/core/network.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/network.c b/src/core/network.c
index 55431971..ced2fb2e 100644
--- a/src/core/network.c
+++ b/src/core/network.c
@@ -53,7 +53,7 @@ inline void sin_set_ip(union sockaddr_union *so, const IPADDR *ip)
if (ip == NULL) {
#ifdef HAVE_IPV6
so->sin6.sin6_family = AF_INET6;
- so->sin6.sin6_addr.s_addr = in6addr_any;
+ so->sin6.sin6_addr = in6addr_any;
#else
so->sin.sin_family = AF_INET;
so->sin.sin_addr.s_addr = INADDR_ANY;
@@ -361,13 +361,15 @@ int net_gethostbyaddr(IPADDR *ip, char **name)
g_return_val_if_fail(ip != NULL, -1);
g_return_val_if_fail(name != NULL, -1);
+ net_ip2host(ip, ipname);
+
*name = NULL;
#ifdef HAVE_IPV6
memset(&req, 0, sizeof(struct addrinfo));
req.ai_socktype = SOCK_STREAM;
/* save error to host_error for later use */
- host_error = getaddrinfo(addr, NULL, &req, &ai);
+ host_error = getaddrinfo(ipname, NULL, &req, &ai);
if (host_error != 0)
return host_error;
@@ -378,8 +380,6 @@ int net_gethostbyaddr(IPADDR *ip, char **name)
freeaddrinfo(ai);
return 1;
#else
- net_ip2host(ip, ipname);
-
hp = gethostbyaddr(ipname, strlen(ipname), AF_INET);
if (hp == NULL) return -1;