cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [ curl-Bugs-1600447 ] Active FTP upload/download withmultiinterface.

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sat, 25 Nov 2006 14:07:35 +0100 (CET)

On Thu, 23 Nov 2006, Alexey Simak wrote:

> As far as I understood from <ftpserver.pl> you test ftp server connects to
> the client immediately after PORT command is received. But real ftp servers
> (at least some of them I tried with) connect to the client after RETR or
> STOR command.

So instead of the previously suggested patch that would check if active FTP is
used in multi.c (knowledge that we certainly do not want the multi code to
deal with), isn't perhaps this patch below enough to solve this issue?

--- lib/ftp.c 17 Oct 2006 21:32:56 -0000 1.382
+++ lib/ftp.c 25 Nov 2006 13:06:53 -0000
@@ -233,7 +233,7 @@
          return CURLE_FTP_PORT_FAILED;
        }
        infof(data, "Connection accepted from server\n");
-
+ conn->bits.tcpconnect = TRUE;
        conn->sock[SECONDARYSOCKET] = s;
        Curl_nonblock(s, TRUE); /* enable non-blocking */
      }

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