[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [gftp] PASV/PORT settings in bookmarks (possible bug)



On Mon, Dec 15, 2003 at 08:55:50PM -0500, Tracer Bullet wrote:
> I've noticed when "Passive file transfers" is set differenly in a
> bookmark than in the global settings, gftp uses the setting in the
> bookmark to get directory listings, but uses the global setting when
> actually transfering files.
> 
> Here's a bit of my log:
> 
> 230 Login successful.
> SYST
> 215 UNIX Type: L8
> TYPE I
> 200 Switching to Binary mode.
> CWD /pub
> 250 Directory successfully changed.
> PASV
> 227 Entering Passive Mode (130,239,18,137,231,31)
> LIST -L
> 150 Here comes the directory listing.
> 226 Directory send OK.
> PORT 192,168,1,3,130,95
> 200 PORT command successful. Consider using PASV.
> RETR /pub/README
> 150 Opening BINARY mode data connection for /pub/README (100 bytes).
> 226 File send OK.
> 
> As you can see, the PASV command was given before LS, but the PORT
> command was given before RETR.  I have tested this on 2.0.16 and
> 2.0.17pre0, both with the same results.

Hi,
   Sorry about the late response. This is now fixed in CVS. Here is a patch for
2.0.16's src/gtk/transfer.c.

--- transfer.c.orig	2004-01-18 15:20:36.000000000 -0500
+++ transfer.c	2004-01-18 15:20:47.000000000 -0500
@@ -430,8 +430,8 @@
     return;
 
   transfer = g_malloc0 (sizeof (*transfer));
-  transfer->fromreq = copy_request (fromwdata->request, 0);
-  transfer->toreq = copy_request (towdata->request, 0);
+  transfer->fromreq = copy_request (fromwdata->request, 1);
+  transfer->toreq = copy_request (towdata->request, 1);
   transfer->fromwdata = fromwdata;
   transfer->towdata = towdata;
 
@@ -873,8 +873,8 @@
       tdata = gftp_tdata_new ();
       if (copy_req)
         {
-          tdata->fromreq = copy_request (fromreq, 0);
-          tdata->toreq = copy_request (toreq, 0); 
+          tdata->fromreq = copy_request (fromreq, 1);
+          tdata->toreq = copy_request (toreq, 1); 
         }
       else
         {


Brian