cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Re: Re: ares again

From: Giuseppe Attardi <attardi_at_di.unipi.it>
Date: Mon, 13 Oct 2003 15:29:02 +0200

Here is a possible patch to multi.c:

*** 378,387 ****
            /* Perform the next step in the connection phase, and then move
on
               to the WAITCONNECT state */
            easy->result = Curl_async_resolved(easy->easy_conn);
! #ifdef USE_ARES
! if(CURLE_OK != easy->result)
! easy->easy_conn = NULL; /* no more connection */
! #endif
            easy->state = CURLM_STATE_WAITCONNECT;
          }

--- 378,384 ----
            /* Perform the next step in the connection phase, and then move
on
               to the WAITCONNECT state */
            easy->result = Curl_async_resolved(easy->easy_conn);
!
            easy->state = CURLM_STATE_WAITCONNECT;
          }

I am not sure though if state should still be CURLM_STATE_WAITCONNECT.

Moreover one should set to NULL the connection after failure in
Curl_async_resolved,
so I would add the lines within the #ifdef to Curl_do in url.c:

            /* Resolved, continue with the connection */
            result = Curl_async_resolved(conn);
            if(result)
              return result;
#ifdef USE_ARES
            else
              *connp = NULL; /* it has been freed, Attardi */
#endif

----- Original Message -----
From: "Giuseppe Attardi" <attardi_at_di.unipi.it>
To: <curl-library_at_lists.sourceforge.net>
Sent: Monday, October 13, 2003 1:10 PM
Subject: [inbox] Re: Re: ares again

> The problem arises because the connection
> gets freed in Curl_disconnect:
>
...

-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
Received on 2003-10-13