cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: keeping connection on multi_remove_handle for FTP

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 6 Dec 2006 00:13:46 +0100 (CET)

On Tue, 5 Dec 2006, Armel Asselin wrote:

> /* if we have a connection we must call Curl_done() here so that we
> don't leave a half-baked one around */
> if(easy->easy_conn)
> Curl_done(&easy->easy_conn, easy->result);
>
> these lines do not taken into account the CURLMState, i.e. if we are not at
> CURM_STATE_COMPLETED and easy->result is OK, we are cancelling, so we should
> not pass easy->result but some error (new one CURLE_CANCELLED?)

I don't think we should overload that variable with another meaning. I think
you should instead add a new variable within the FTP struct that keeps
information whether you should use ABOR when the connection is cancelled.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2006-12-06