summaryrefslogtreecommitdiff
path: root/lib/hostip6.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2006-07-27 22:28:53 +0000
committerDaniel Stenberg <daniel@haxx.se>2006-07-27 22:28:53 +0000
commite6ea8f11992e22cc73d7f6a5380cea31ce11d179 (patch)
tree0c8b4d7886d823c06922fb8f1e243e8518a3b004 /lib/hostip6.c
parent4d4151f6c10c8770c70dd3b1d06a84ca5191142f (diff)
downloadcurl-e6ea8f11992e22cc73d7f6a5380cea31ce11d179.tar.gz
put back the correct logic, as the change dated July 11th 2006 added bad
behaviour and a socket leak
Diffstat (limited to 'lib/hostip6.c')
-rw-r--r--lib/hostip6.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/hostip6.c b/lib/hostip6.c
index 7ea632a63..c8bbdb5e9 100644
--- a/lib/hostip6.c
+++ b/lib/hostip6.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2005, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2006, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -244,7 +244,7 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
/* see if we have an IPv6 stack */
s = socket(PF_INET6, SOCK_DGRAM, 0);
- if (s != CURL_SOCKET_BAD) {
+ if (s == CURL_SOCKET_BAD) {
/* Some non-IPv6 stacks have been found to make very slow name resolves
* when PF_UNSPEC is used, so thus we switch to a mere PF_INET lookup if
* the stack seems to be a non-ipv6 one. */