On Sun, Nov 23, 2003 at 04:17:07PM -0800, Roboco Sanchez wrote:
> I have a problem with fxp. If I use this command:
>
> mirror ftp://server1/a/ ftp://server2/a/
>
> The traffic goes from server1 to server2 directly. The
> indication while each file is being transfered is
> "Waiting for the transfer to finish", or something
> like that, with no transfer speed at all.
For some reason, the transmitting server does not close data connection,
and the receiving server does not send acknowledge to lftp.
> Now if I change the servers from the above "ftp+auth
> tls" to "ftps only" and use this command:
>
> mirror ftps://server1/a/ ftps://server2/a/
>
> The traffic comes to me first before goes to server2.
> I can notice the incoming and outgoing traffic on my
> box. Also the indication while each file is being
> transfered is "Receiving file->Sending file", or
> something like that, with a real-time transfer speed.
This can be easily fixed. Patch attached.
--
Alexander.
Index: FileCopyFtp.cc
===================================================================
RCS file: /home/lav/cvsroot/lftp/src/FileCopyFtp.cc,v
retrieving revision 1.17
diff -u -p -r1.17 FileCopyFtp.cc
--- FileCopyFtp.cc 21 Aug 2003 08:43:23 -0000 1.17
+++ FileCopyFtp.cc 24 Nov 2003 08:27:51 -0000
@@ -215,7 +215,8 @@ FileCopy *FileCopyFtp::New(FileCopyPeer
FA *d_s=d->GetSession();
if(!s_s || !d_s)
return 0;
- if(strcmp(s_s->GetProto(),"ftp") || strcmp(d_s->GetProto(),"ftp"))
+ if((strcmp(s_s->GetProto(),"ftp") && strcmp(s_s->GetProto(),"ftps"))
+ || (strcmp(d_s->GetProto(),"ftp") && strcmp(d_s->GetProto(),"ftps")))
return 0;
if(!ResMgr::QueryBool("ftp:use-fxp",s_s->GetHostName())
|| !ResMgr::QueryBool("ftp:use-fxp",d_s->GetHostName()))