cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: FTP third party transfer (proxy) support.

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Tue, 1 Jun 2004 09:30:15 +0200 (CEST)

On Sun, 30 May 2004, Alexander Krasnostavsky wrote:

> curl_global_init(CURL_GLOBAL_DEFAULT);
> curl = curl_easy_init();
> ...
> curl_easy_setopt(curl, CURLOPT_PREQUOTE, pre_cmd);
> res = curl_easy_perform(curl); /* the first transfer */
> ...
> curl_slist_free_all(pre_cmd);
> curl_easy_setopt(curl, CURLOPT_PREQUOTE, NULL);
> res = curl_easy_perform(curl); /* the second transfer - cause coredump
> because pre_cmd was freed */

This certainly indicates a bug, yes.

> So I add the following before line "Curl_safefree(old_conn->user);" :
> /* it is important to update user's options */
> memcpy(&(conn->data->set), &(old_conn->data->set), sizeof(struct
> UserDefined));

Sorry, but I can't see how this can fix anything. The 'data' pointers should
be pointing to the *same* struct for both connections. The connections are but
two structs using the same base SessionHandle struct!

-- 
     Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
      Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-06-01