summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2002-01-29 23:11:22 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2002-01-29 23:11:22 +0000
commit0edf041e14f7f76c320323e29428456b60f8b792 (patch)
tree32986a1dc31b1c484d4f2a08b38677ba82457d1f /src
parent13eb6379e791574a0d729a63c064218656f96150 (diff)
downloadirssi-0edf041e14f7f76c320323e29428456b60f8b792.zip
..and of course I broke IPv4 net_gethostbyname() with it :)
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2359 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r--src/core/network.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/network.c b/src/core/network.c
index 2ce7910d..3904d01c 100644
--- a/src/core/network.c
+++ b/src/core/network.c
@@ -411,15 +411,16 @@ int net_gethostbyname(const char *addr, IPADDR *ip4, IPADDR *ip6)
}
}
freeaddrinfo(ailist);
+ return count > 0 ? 0 : 1;
#else
hp = gethostbyname(addr);
if (hp == NULL) return h_errno;
ip4->family = AF_INET;
memcpy(&ip4->ip, hp->h_addr, 4);
-#endif
- return count > 0 ? 0 : 1;
+ return 0;
+#endif
}
/* Get name for host, *name should be g_free()'d unless it's NULL.