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

List:       kde-commits
Subject:    extragear/network/kftpgrabber/src/ftp
From:       Jernej Kos <kostko () unimatrix-one ! org>
Date:       2005-07-20 12:46:27
Message-ID: 1121863587.212291.5068.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 436877 by kostko:

Don't disable PASV if it fails on DrFTPD.

 M  +9 -2      ftpsocket.cpp  


--- trunk/extragear/network/kftpgrabber/src/ftp/ftpsocket.cpp #436876:436877
@@ -774,8 +774,15 @@
     // Maybe this was due to ports used for PASV was blocked/filtered, or the server simply
     // was lying about its capabilities (less likely). Updating configuration so PASV wont
     // be used anymore for this connection.
-    setConfig("can_pasv", 0);
-
+    int pasv_fails = getConfig("pasv_fails");
+    
+    // PASV has failed two times (and this is not a distributed server), it shall be disabled
+    if (++pasv_fails >= 2 && getConfig("feat_pret") != 1) {
+      sigLogUpdate(4, i18n("Passive mode has failed two times, disabling use of PASV!"));
+      setConfig("can_pasv", 0);
+    }
+    
+    setConfig("pasv_fails", pasv_fails);
     return false;
   }
 
[prev in list] [next in list] [prev in thread] [next in thread] 

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