cURL / Mailing Lists / curl-library / Single Mail

curl-library

Compilation error if CURL_DOES_CONVERSIONS defined

From: David McCreedy <mccreedytpf_at_msn.com>
Date: Tue, 22 Aug 2006 19:34:21 +0000

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.
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 picked the former.

-David

+++ lib/transfer.c 2006-08-22 15:15:37.188806000 -0400
@@ -170,7 +170,7 @@
   *nreadp = nread;

#ifdef CURL_DOES_CONVERSIONS
- if(data->ftp_in_ascii_mode) {
+ if(conn->proto.ftp->transfertype == 'A') {
     CURLcode res;
     res = Curl_convert_to_network(data, conn->upload_fromhere, nread);
     /* Curl_convert_to_network calls failf if unsuccessful */

Received on 2006-08-22