cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: FTP third party transfer on the same remote host.

From: Alexander Krasnostavsky <ALEXANDERKR_at_Amdocs.com>
Date: Mon, 18 Oct 2004 19:03:56 +0200

1. OK.
2. But value of data->set.reuse_fresh returned to the original value
immediately after connection. The value is changed to a little time
period and this is the only flag that checked to cancel reuse.

bool reuse_fresh_tmp = data->set.reuse_fresh; /* saving */
...
if (strequal(conn->host.dispname, data->set.source_host) == 0) {
  data->set.reuse_fresh = TRUE; /* changing */
  /* no return points from here until the restore */
}
... /* Curl_connect_host() */
data->set.reuse_fresh = reuse_fresh_tmp; /* restoring */

Do you mean that CreateConnection() will check only the "shadow
variable" instead of data->set.reuse_fresh? What is the difference?

-----Original Message-----
Sent: Monday, October 18, 2004 16:27

Thanks, this looks like a neat fix. The patch has two problems though:

1. Host names are case insensitive, use strequal() not strcmp().

2. A slightly bigger but more obscure bug:

    You're not allowed to set data->set.reuse_fresh like this. It will
    modify how future invokes with this same handle will behave. You
need
    to create a "shadow variable" that gets the data->set.reuse_fresh
value
    set from the start and later can be changed internally if need be.

The information contained in this message is proprietary of Amdocs,
protected from disclosure, and may be privileged.
The information is intended to be conveyed only to the designated recipient(s)
of the message. If the reader of this message is not the intended recipient,
you are hereby notified that any dissemination, use, distribution or copying of
this communication is strictly prohibited and may be unlawful.
If you have received this communication in error, please notify us immediately
by replying to the message and deleting it from your computer.
Thank you.
Received on 2004-10-18