OSDN Git Service

Fix bugs of corruption on resuming downloading files larger than 4GB.
[ffftp/ffftp.git] / connect.c
index 186bfca..904fd0d 100644 (file)
--- a/connect.c
+++ b/connect.c
@@ -1299,16 +1299,6 @@ static SOCKET DoConnectCrypt(int CryptMode, HOSTDATA* HostData, char *Host, char
                                        {\r
                                                while((Sts = ReadReplyMessage(ContSock, Buf, 1024, &CancelFlg, TmpBuf) / 100) == FTP_PRELIM)\r
                                                        ;\r
-                                               if((Sts = command(ContSock, Reply, &CancelFlg, "PBSZ 0")) == 200)\r
-                                               {\r
-                                                       if((Sts = command(ContSock, Reply, &CancelFlg, "PROT P")) == 200)\r
-                                                       {\r
-                                                       }\r
-                                                       else\r
-                                                               Sts = FTP_ERROR;\r
-                                               }\r
-                                               else\r
-                                                       Sts = FTP_ERROR;\r
                                        }\r
                                        else\r
                                                Sts = FTP_ERROR;\r
@@ -1566,12 +1556,12 @@ static SOCKET DoConnect(HOSTDATA* HostData, char *Host, char *User, char *Pass,
                if((ContSock = DoConnectCrypt(CRYPT_SFTP, HostData, Host, User, Pass, Acct, Port, Fwall, SavePass, Security)) != INVALID_SOCKET)\r
                        HostData->CryptMode = CRYPT_SFTP;\r
        }\r
-//     if(CancelFlg == NO && ContSock == INVALID_SOCKET && HostData->UseFTPIS == YES)\r
-//     {\r
-//             SetTaskMsg(MSGJPN316);\r
-//             if((ContSock = DoConnectCrypt(CRYPT_FTPIS, HostData, Host, User, Pass, Acct, Port, Fwall, SavePass, Security)) != INVALID_SOCKET)\r
-//                     HostData->CryptMode = CRYPT_FTPIS;\r
-//     }\r
+       if(CancelFlg == NO && ContSock == INVALID_SOCKET && HostData->UseFTPIS == YES)\r
+       {\r
+               SetTaskMsg(MSGJPN316);\r
+               if((ContSock = DoConnectCrypt(CRYPT_FTPIS, HostData, Host, User, Pass, Acct, Port, Fwall, SavePass, Security)) != INVALID_SOCKET)\r
+                       HostData->CryptMode = CRYPT_FTPIS;\r
+       }\r
        if(CancelFlg == NO && ContSock == INVALID_SOCKET && HostData->UseFTPES == YES)\r
        {\r
                SetTaskMsg(MSGJPN315);\r