cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Compilation error if CURL_DOES_CONVERSIONS defined

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 22 Aug 2006 23:26:51 +0200 (CEST)

On Tue, 22 Aug 2006, David McCreedy wrote:

> The ftp_in_ascii_mode check in transfer.c was forgotten when
> ftp_transfertype() and ftp_nb_type() were implemented. That causes a
> compilation error if CURL_DOES_CONVERSIONS is defined.

Ouch. Sorry for that, I was sure I had tested this with a build with
CURL_DOES_CONVERSIONS enabled but clearly I must've dreamed that.

> This patch (attached and shown below) changes the code to use the new field.
> In my testing both conn->proto.ftp->transfertype and
> conn->data->set.prefer_ascii were set correctly for the desired transfer
> TYPE. I don’t know if one is preferable over the other.

I changed to use data->set.prefer_ascii since that is set by the app as what
type it prefers (for any protcol) while conn->proto.ftp->transfertype is only
set - and even existing - for FTP (and then only after the TYPE has been
issued to set the type to 'A' but it should make no difference for this fix).

Thanks for the fix!

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