curl-library
Re: Connect-timeout on Win32
Date: Sat, 21 Feb 2004 18:21:37 +0100
> Applied, approved, liked, enjoyed and then... committed!
>
> Thanks. I guess it is time for the windows hordes to test this! ;-)
>From CVS 30 min ago, it looks like you forgot to patch url.c
and urldata.h:
--- CVS-latest/lib/url.c Mon Feb 16 16:24:22 2004
+++ lib/url.c Tue Feb 17 13:52:39 2004
@@ -1360,9 +1360,10 @@
Curl_safefree(conn->allocptr.host);
Curl_safefree(conn->allocptr.cookiehost);
Curl_safefree(conn->proxyhost);
-#ifdef USE_ARES
+#if defined(USE_ARES) || defined(USE_THREADING_GETHOSTBYNAME)
/* possible left-overs from the async name resolve */
Curl_safefree(conn->async.hostname);
+ Curl_safefree(conn->async.os_specific);
#endif
Curl_free_ssl_config(&conn->ssl_config);
@@ -3238,7 +3239,7 @@
then a successful name resolve has been received */
CURLcode Curl_async_resolved(struct connectdata *conn)
{
-#ifdef USE_ARES
+#if defined(USE_ARES) || defined(USE_THREADING_GETHOSTBYNAME)
CURLcode code = SetupConnection(conn, conn->async.dns);
if(code)
--- CVS-latest/lib/urldata.h Fri Feb 20 09:47:23 2004
+++ lib/urldata.h Fri Feb 20 11:42:11 2004
@@ -376,13 +376,14 @@
bool ignorebody; /* we read a response-body but we ignore it! */
};
-#ifdef USE_ARES
+#if defined(USE_ARES) || defined(USE_THREADING_GETHOSTBYNAME)
struct Curl_async {
char *hostname;
int port;
struct Curl_dns_entry *dns;
bool done; /* set TRUE when the lookup is complete */
int status; /* if done is TRUE, this is the status from the callback */
+ void *os_specific; /* 'struct thread_data' for Windows */
};
#endif
@@ -566,7 +567,7 @@
int sockerror; /* errno stored by Curl_read() if the underlying layer returns
error */
-#ifdef USE_ARES
+#if defined(USE_ARES) || defined(USE_THREADING_GETHOSTBYNAME)
/* data used for the asynch name resolve callback */
struct Curl_async async;
#endif
--------
Had some problems with the 'os_specific', but didn't see any other way.
--gv
Received on 2004-02-21