From 67eb679264b9b6ebd1b123275ac729c8092fce10 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 23 Mar 2011 11:10:55 +0100 Subject: ipv6: only probe once Move ipv6-functional-probe into a single function that is used from all places that need to know. Make the probe function store the result in a static variable so that subsequent invokes just returns the previous result and won't have to probe again. --- lib/hostip.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'lib/hostip.h') diff --git a/lib/hostip.h b/lib/hostip.h index 3f27a2b87..c1f4486a6 100644 --- a/lib/hostip.h +++ b/lib/hostip.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2010, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2011, 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 @@ -113,6 +113,15 @@ int Curl_resolv_timeout(struct connectdata *conn, const char *hostname, int port, struct Curl_dns_entry **dnsentry, long timeoutms); +#ifdef CURLRES_IPV6 +/* + * Curl_ipv6works() returns TRUE if ipv6 seems to work. + */ +bool Curl_ipv6works(void); +#else +#define Curl_ipv6works() FALSE +#endif + /* * Curl_ipvalid() checks what CURL_IPRESOLVE_* requirements that might've * been set and returns TRUE if they are OK. -- cgit v1.2.3