From: Daniel Stenberg Date: Thu, 27 Jul 2006 22:28:53 +0000 (+0000) Subject: put back the correct logic, as the change dated July 11th 2006 added bad X-Git-Tag: curl-7_15_5~41 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e6ea8f11992e22cc73d7f6a5380cea31ce11d179;p=curl put back the correct logic, as the change dated July 11th 2006 added bad behaviour and a socket leak --- 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, , et al. + * Copyright (C) 1998 - 2006, Daniel Stenberg, , 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. */