[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdelibs/kioslave/ftp
From:       Thiago Macieira <thiago.macieira () kdemail ! net>
Date:       2004-04-08 0:59:21
Message-ID: 20040408005921.5E2439A13 () office ! kde ! org
[Download RAW message or body]

CVS commit by thiago: 

Moving the PASV attempt up to before EPSV is tried.
Consequence: IPv4 connections try PASV first, which should always work.

This could be to work around some buggy FTP servers and/or firewalls that won't
allow connections in that were created with EPSV. But it's not. Buggy FTP
servers are still buggy.

This is just to improve efficiency in normal connections by issuing one
less command. :-)


  M +6 -6      ftp.cc   1.207


--- kdelibs/kioslave/ftp/ftp.cc  #1.206:1.207
@@ -1002,16 +1002,16 @@ int Ftp::ftpOpenDataConnection()
   if( !config()->readBoolEntry("DisablePassiveMode", false) )
   {
-    if( !config()->readBoolEntry("DisableEPSV", false) )
-    {
-      iErrCode = ftpOpenEPSVDataConnection();
+    iErrCode = ftpOpenPASVDataConnection();
       if(iErrCode != ERR_INTERNAL)
         return iErrCode;
       ftpCloseDataConnection();
-    }
     
-    iErrCode = ftpOpenPASVDataConnection();
+    if( !config()->readBoolEntry("DisableEPSV", false) )
+    {
+      iErrCode = ftpOpenEPSVDataConnection();
     if(iErrCode != ERR_INTERNAL)
       return iErrCode;
     ftpCloseDataConnection();
+    }
 
     // if we sent EPSV ALL already and it was accepted, then we can't


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic