Loweynet
リビジョン | a82e762de627fc89cfb5524f9615eaf43fb0f481 (tree) |
---|---|
日時 | 2013-01-05 17:55:38 |
作者 | s_kawamoto <s_kawamoto@user...> |
コミッター | s_kawamoto |
Fix bugs of unexpected interruption of the transfer when the shared command socket is disconnected.
Add options for reconnection on transfer errors.
Fix bugs of shared command sockets.
Fix spelling mistakes.
Modify documents.
@@ -1392,6 +1392,7 @@ BEGIN | ||
1392 | 1392 | LTEXT "(0`300b; 0=³ø)",-1,122,44,76,8 |
1393 | 1393 | LTEXT "]G[Ì",-1,7,61,81,8 |
1394 | 1394 | COMBOBOX HSET_ERROR_MODE,7,71,71,75,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP |
1395 | + CONTROL "]G[ãÉÄÚ±",HSET_ERROR_RECONNECT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,84,71,102,10 | |
1395 | 1396 | END |
1396 | 1397 | |
1397 | 1398 | savecrypt_dlg DIALOG 0, 0, 146, 62 |
@@ -455,6 +455,7 @@ | ||
455 | 455 | #define TRMODE4_EUC_CNV 1217 |
456 | 456 | #define TRMODE4_UTF8N_CNV 1218 |
457 | 457 | #define TRMODE4_UTF8BOM_CNV 1219 |
458 | +#define HSET_ERROR_RECONNECT 1220 | |
458 | 459 | #define MENU_END 40001 |
459 | 460 | #define MENU_EXIT 40001 |
460 | 461 | #define MENU_CONNECT 40003 |
@@ -643,7 +644,7 @@ | ||
643 | 644 | #ifndef APSTUDIO_READONLY_SYMBOLS |
644 | 645 | #define _APS_NEXT_RESOURCE_VALUE 197 |
645 | 646 | #define _APS_NEXT_COMMAND_VALUE 40177 |
646 | -#define _APS_NEXT_CONTROL_VALUE 1220 | |
647 | +#define _APS_NEXT_CONTROL_VALUE 1221 | |
647 | 648 | #define _APS_NEXT_SYMED_VALUE 101 |
648 | 649 | #endif |
649 | 650 | #endif |
@@ -1422,6 +1422,7 @@ BEGIN | ||
1422 | 1422 | LTEXT "(0 to 300sec; 0=Never)",-1,122,44,76,8 |
1423 | 1423 | LTEXT "When transfer errors",-1,7,61,81,8 |
1424 | 1424 | COMBOBOX HSET_ERROR_MODE,7,71,71,75,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP |
1425 | + CONTROL "Reconnect after errors",HSET_ERROR_RECONNECT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,84,71,102,10 | |
1425 | 1426 | END |
1426 | 1427 | |
1427 | 1428 | savecrypt_dlg DIALOG 0, 0, 146, 62 |
@@ -455,6 +455,7 @@ | ||
455 | 455 | #define TRMODE4_EUC_CNV 1217 |
456 | 456 | #define TRMODE4_UTF8N_CNV 1218 |
457 | 457 | #define TRMODE4_UTF8BOM_CNV 1219 |
458 | +#define HSET_ERROR_RECONNECT 1220 | |
458 | 459 | #define MENU_END 40001 |
459 | 460 | #define MENU_EXIT 40001 |
460 | 461 | #define MENU_CONNECT 40003 |
@@ -643,7 +644,7 @@ | ||
643 | 644 | #ifndef APSTUDIO_READONLY_SYMBOLS |
644 | 645 | #define _APS_NEXT_RESOURCE_VALUE 197 |
645 | 646 | #define _APS_NEXT_COMMAND_VALUE 40177 |
646 | -#define _APS_NEXT_CONTROL_VALUE 1220 | |
647 | +#define _APS_NEXT_CONTROL_VALUE 1221 | |
647 | 648 | #define _APS_NEXT_SYMED_VALUE 101 |
648 | 649 | #endif |
649 | 650 | #endif |
@@ -1037,6 +1037,8 @@ typedef struct { | ||
1037 | 1037 | // 再転送対応 |
1038 | 1038 | int TransferErrorMode; /* 転送エラー時の処理 (EXIST_xxx) */ |
1039 | 1039 | int TransferErrorNotify; /* 転送エラー時に確認ダイアログを出すかどうか (YES/NO) */ |
1040 | + // セッションあたりの転送量制限対策 | |
1041 | + int TransferErrorReconnect; /* 転送エラー時に再接続する (YES/NO) */ | |
1040 | 1042 | } HOSTDATA; |
1041 | 1043 | |
1042 | 1044 |
@@ -1101,6 +1103,8 @@ typedef struct historydata { | ||
1101 | 1103 | // 再転送対応 |
1102 | 1104 | int TransferErrorMode; /* 転送エラー時の処理 (EXIST_xxx) */ |
1103 | 1105 | int TransferErrorNotify; /* 転送エラー時に確認ダイアログを出すかどうか (YES/NO) */ |
1106 | + // セッションあたりの転送量制限対策 | |
1107 | + int TransferErrorReconnect; /* 転送エラー時に再接続する (YES/NO) */ | |
1104 | 1108 | struct historydata *Next; |
1105 | 1109 | } HISTORYDATA; |
1106 | 1110 |
@@ -1499,7 +1503,7 @@ void CopyDefaultHost(HOSTDATA *Set); | ||
1499 | 1503 | int SearchHostName(char *Name); |
1500 | 1504 | void ImportFromWSFTP(void); |
1501 | 1505 | // 暗号化通信対応 |
1502 | -int SetHostExcryption(int Num, int UseNoEncryption, int UseFTPES, int UseFTPIS, int UseSFTP); | |
1506 | +int SetHostEncryption(int Num, int UseNoEncryption, int UseFTPES, int UseFTPIS, int UseSFTP); | |
1503 | 1507 | |
1504 | 1508 | /*===== connect.c =====*/ |
1505 | 1509 |
@@ -1571,6 +1575,8 @@ int AskNoopInterval(void); | ||
1571 | 1575 | // 再転送対応 |
1572 | 1576 | int AskTransferErrorMode(void); |
1573 | 1577 | int AskTransferErrorNotify(void); |
1578 | +// セッションあたりの転送量制限対策 | |
1579 | +int AskErrorReconnect(void); | |
1574 | 1580 | |
1575 | 1581 | /*===== cache.c =====*/ |
1576 | 1582 |
@@ -202,28 +202,28 @@ void ConnectProc(int Type, int Num) | ||
202 | 202 | if(CurHost.UseFTPIS != NO || CurHost.UseSFTP != NO) |
203 | 203 | { |
204 | 204 | if(DialogBox(GetFtpInst(), MAKEINTRESOURCE(savecrypt_dlg), GetMainHwnd(), ExeEscDialogProc) == YES) |
205 | - SetHostExcryption(AskCurrentHost(), CurHost.UseNoEncryption, CurHost.UseFTPES, NO, NO); | |
205 | + SetHostEncryption(AskCurrentHost(), CurHost.UseNoEncryption, CurHost.UseFTPES, NO, NO); | |
206 | 206 | } |
207 | 207 | break; |
208 | 208 | case CRYPT_FTPES: |
209 | 209 | if(CurHost.UseNoEncryption != NO || CurHost.UseFTPIS != NO || CurHost.UseSFTP != NO) |
210 | 210 | { |
211 | 211 | if(DialogBox(GetFtpInst(), MAKEINTRESOURCE(savecrypt_dlg), GetMainHwnd(), ExeEscDialogProc) == YES) |
212 | - SetHostExcryption(AskCurrentHost(), NO, CurHost.UseFTPES, NO, NO); | |
212 | + SetHostEncryption(AskCurrentHost(), NO, CurHost.UseFTPES, NO, NO); | |
213 | 213 | } |
214 | 214 | break; |
215 | 215 | case CRYPT_FTPIS: |
216 | 216 | if(CurHost.UseNoEncryption != NO || CurHost.UseFTPES != NO || CurHost.UseSFTP != NO) |
217 | 217 | { |
218 | 218 | if(DialogBox(GetFtpInst(), MAKEINTRESOURCE(savecrypt_dlg), GetMainHwnd(), ExeEscDialogProc) == YES) |
219 | - SetHostExcryption(AskCurrentHost(), NO, NO, CurHost.UseFTPIS, NO); | |
219 | + SetHostEncryption(AskCurrentHost(), NO, NO, CurHost.UseFTPIS, NO); | |
220 | 220 | } |
221 | 221 | break; |
222 | 222 | case CRYPT_SFTP: |
223 | 223 | if(CurHost.UseNoEncryption != NO || CurHost.UseFTPES != NO || CurHost.UseFTPIS != NO) |
224 | 224 | { |
225 | 225 | if(DialogBox(GetFtpInst(), MAKEINTRESOURCE(savecrypt_dlg), GetMainHwnd(), ExeEscDialogProc) == YES) |
226 | - SetHostExcryption(AskCurrentHost(), NO, NO, NO, CurHost.UseSFTP); | |
226 | + SetHostEncryption(AskCurrentHost(), NO, NO, NO, CurHost.UseSFTP); | |
227 | 227 | } |
228 | 228 | break; |
229 | 229 | } |
@@ -772,10 +772,18 @@ int AskHostNameKanji(void) | ||
772 | 772 | |
773 | 773 | int AskHostNameKana(void) |
774 | 774 | { |
775 | + // 同時接続対応 | |
776 | + HOSTDATA TmpHost; | |
777 | + TmpHost = CurHost; | |
778 | + | |
775 | 779 | if(AskCurrentHost() != HOSTNUM_NOENTRY) |
776 | - CopyHostFromListInConnect(AskCurrentHost(), &CurHost); | |
780 | + // 同時接続対応 | |
781 | +// CopyHostFromListInConnect(AskCurrentHost(), &CurHost); | |
782 | + CopyHostFromListInConnect(AskCurrentHost(), &TmpHost); | |
777 | 783 | |
778 | - return(CurHost.NameKanaCnv); | |
784 | + // 同時接続対応 | |
785 | +// return(CurHost.NameKanaCnv); | |
786 | + return(TmpHost.NameKanaCnv); | |
779 | 787 | } |
780 | 788 | |
781 | 789 |
@@ -790,13 +798,21 @@ int AskHostNameKana(void) | ||
790 | 798 | |
791 | 799 | int AskListCmdMode(void) |
792 | 800 | { |
801 | + // 同時接続対応 | |
802 | + HOSTDATA TmpHost; | |
803 | + TmpHost = CurHost; | |
804 | + | |
793 | 805 | if(CurHost.HostType == HTYPE_VMS) |
794 | 806 | return(YES); |
795 | 807 | else |
796 | 808 | { |
797 | 809 | if(AskCurrentHost() != HOSTNUM_NOENTRY) |
798 | - CopyHostFromListInConnect(AskCurrentHost(), &CurHost); | |
799 | - return(CurHost.ListCmdOnly); | |
810 | + // 同時接続対応 | |
811 | +// CopyHostFromListInConnect(AskCurrentHost(), &CurHost); | |
812 | + CopyHostFromListInConnect(AskCurrentHost(), &TmpHost); | |
813 | + // 同時接続対応 | |
814 | +// return(CurHost.ListCmdOnly); | |
815 | + return(TmpHost.ListCmdOnly); | |
800 | 816 | } |
801 | 817 | } |
802 | 818 |
@@ -812,10 +828,18 @@ int AskListCmdMode(void) | ||
812 | 828 | |
813 | 829 | int AskUseNLST_R(void) |
814 | 830 | { |
831 | + // 同時接続対応 | |
832 | + HOSTDATA TmpHost; | |
833 | + TmpHost = CurHost; | |
834 | + | |
815 | 835 | if(AskCurrentHost() != HOSTNUM_NOENTRY) |
816 | - CopyHostFromListInConnect(AskCurrentHost(), &CurHost); | |
836 | + // 同時接続対応 | |
837 | +// CopyHostFromListInConnect(AskCurrentHost(), &CurHost); | |
838 | + CopyHostFromListInConnect(AskCurrentHost(), &TmpHost); | |
817 | 839 | |
818 | - return(CurHost.UseNLST_R); | |
840 | + // 同時接続対応 | |
841 | +// return(CurHost.UseNLST_R); | |
842 | + return(TmpHost.UseNLST_R); | |
819 | 843 | } |
820 | 844 | |
821 | 845 |
@@ -830,10 +854,18 @@ int AskUseNLST_R(void) | ||
830 | 854 | |
831 | 855 | char *AskHostChmodCmd(void) |
832 | 856 | { |
857 | + // 同時接続対応 | |
858 | + HOSTDATA TmpHost; | |
859 | + TmpHost = CurHost; | |
860 | + | |
833 | 861 | if(AskCurrentHost() != HOSTNUM_NOENTRY) |
834 | - CopyHostFromListInConnect(AskCurrentHost(), &CurHost); | |
862 | + // 同時接続対応 | |
863 | +// CopyHostFromListInConnect(AskCurrentHost(), &CurHost); | |
864 | + CopyHostFromListInConnect(AskCurrentHost(), &TmpHost); | |
835 | 865 | |
836 | - return(CurHost.ChmodCmd); | |
866 | + // 同時接続対応 | |
867 | +// return(CurHost.ChmodCmd); | |
868 | + return(TmpHost.ChmodCmd); | |
837 | 869 | } |
838 | 870 | |
839 | 871 |
@@ -848,10 +880,18 @@ char *AskHostChmodCmd(void) | ||
848 | 880 | |
849 | 881 | int AskHostTimeZone(void) |
850 | 882 | { |
883 | + // 同時接続対応 | |
884 | + HOSTDATA TmpHost; | |
885 | + TmpHost = CurHost; | |
886 | + | |
851 | 887 | if(AskCurrentHost() != HOSTNUM_NOENTRY) |
852 | - CopyHostFromListInConnect(AskCurrentHost(), &CurHost); | |
888 | + // 同時接続対応 | |
889 | +// CopyHostFromListInConnect(AskCurrentHost(), &CurHost); | |
890 | + CopyHostFromListInConnect(AskCurrentHost(), &TmpHost); | |
853 | 891 | |
854 | - return(CurHost.TimeZone); | |
892 | + // 同時接続対応 | |
893 | +// return(CurHost.TimeZone); | |
894 | + return(TmpHost.TimeZone); | |
855 | 895 | } |
856 | 896 | |
857 | 897 |
@@ -881,10 +921,18 @@ int AskPasvMode(void) | ||
881 | 921 | |
882 | 922 | char *AskHostLsName(void) |
883 | 923 | { |
924 | + // 同時接続対応 | |
925 | + HOSTDATA TmpHost; | |
926 | + TmpHost = CurHost; | |
927 | + | |
884 | 928 | if(AskCurrentHost() != HOSTNUM_NOENTRY) |
885 | - CopyHostFromListInConnect(AskCurrentHost(), &CurHost); | |
929 | + // 同時接続対応 | |
930 | +// CopyHostFromListInConnect(AskCurrentHost(), &CurHost); | |
931 | + CopyHostFromListInConnect(AskCurrentHost(), &TmpHost); | |
886 | 932 | |
887 | - return(CurHost.LsName); | |
933 | + // 同時接続対応 | |
934 | +// return(CurHost.LsName); | |
935 | + return(TmpHost.LsName); | |
888 | 936 | } |
889 | 937 | |
890 | 938 |
@@ -899,8 +947,14 @@ char *AskHostLsName(void) | ||
899 | 947 | |
900 | 948 | int AskHostType(void) |
901 | 949 | { |
950 | + // 同時接続対応 | |
951 | + HOSTDATA TmpHost; | |
952 | + TmpHost = CurHost; | |
953 | + | |
902 | 954 | if(AskCurrentHost() != HOSTNUM_NOENTRY) |
903 | - CopyHostFromListInConnect(AskCurrentHost(), &CurHost); | |
955 | + // 同時接続対応 | |
956 | +// CopyHostFromListInConnect(AskCurrentHost(), &CurHost); | |
957 | + CopyHostFromListInConnect(AskCurrentHost(), &TmpHost); | |
904 | 958 | |
905 | 959 | #if defined(HAVE_TANDEM) |
906 | 960 | /* OSS ファイルシステムは UNIX ファイルシステムと同じでいいので AUTO を返す |
@@ -910,7 +964,9 @@ int AskHostType(void) | ||
910 | 964 | return(HTYPE_AUTO); |
911 | 965 | #endif |
912 | 966 | |
913 | - return(CurHost.HostType); | |
967 | + // 同時接続対応 | |
968 | +// return(CurHost.HostType); | |
969 | + return(TmpHost.HostType); | |
914 | 970 | } |
915 | 971 | |
916 | 972 |
@@ -979,13 +1035,19 @@ void SaveCurrentSetToHost(void) | ||
979 | 1035 | int Host; |
980 | 1036 | char LocDir[FMAX_PATH+1]; |
981 | 1037 | char HostDir[FMAX_PATH+1]; |
1038 | + // 同時接続対応 | |
1039 | + HOSTDATA TmpHost; | |
1040 | + TmpHost = CurHost; | |
982 | 1041 | |
983 | 1042 | if(TrnCtrlSocket != INVALID_SOCKET) |
984 | 1043 | { |
985 | 1044 | if((Host = AskCurrentHost()) != HOSTNUM_NOENTRY) |
986 | 1045 | { |
987 | - CopyHostFromListInConnect(Host, &CurHost); | |
988 | - if(CurHost.LastDir == YES) | |
1046 | + // 同時接続対応 | |
1047 | +// CopyHostFromListInConnect(Host, &CurHost); | |
1048 | +// if(CurHost.LastDir == YES) | |
1049 | + CopyHostFromListInConnect(Host, &TmpHost); | |
1050 | + if(TmpHost.LastDir == YES) | |
989 | 1051 | { |
990 | 1052 | AskLocalCurDir(LocDir, FMAX_PATH); |
991 | 1053 | AskRemoteCurDir(HostDir, FMAX_PATH); |
@@ -1046,13 +1108,19 @@ int ReConnectCmdSkt(void) | ||
1046 | 1108 | int Sts; |
1047 | 1109 | |
1048 | 1110 | |
1049 | - if(CmdCtrlSocket != TrnCtrlSocket) | |
1050 | - do_closesocket(TrnCtrlSocket); | |
1051 | - TrnCtrlSocket = INVALID_SOCKET; | |
1111 | + // 同時接続対応 | |
1112 | +// if(CmdCtrlSocket != TrnCtrlSocket) | |
1113 | +// do_closesocket(TrnCtrlSocket); | |
1114 | +// TrnCtrlSocket = INVALID_SOCKET; | |
1115 | + if(CmdCtrlSocket == TrnCtrlSocket) | |
1116 | + TrnCtrlSocket = INVALID_SOCKET; | |
1052 | 1117 | |
1053 | 1118 | Sts = ReConnectSkt(&CmdCtrlSocket); |
1054 | 1119 | |
1055 | - TrnCtrlSocket = CmdCtrlSocket; | |
1120 | + // 同時接続対応 | |
1121 | +// TrnCtrlSocket = CmdCtrlSocket; | |
1122 | + if(TrnCtrlSocket == INVALID_SOCKET) | |
1123 | + TrnCtrlSocket = CmdCtrlSocket; | |
1056 | 1124 | |
1057 | 1125 | return(Sts); |
1058 | 1126 | } |
@@ -1216,6 +1284,7 @@ void SktShareProh(void) | ||
1216 | 1284 | // ReConnectSkt(&CmdCtrlSocket); |
1217 | 1285 | if(CurHost.ReuseCmdSkt == YES) |
1218 | 1286 | { |
1287 | + CurHost.ReuseCmdSkt = NO; | |
1219 | 1288 | CmdCtrlSocket = INVALID_SOCKET; |
1220 | 1289 | ReConnectSkt(&CmdCtrlSocket); |
1221 | 1290 | } |
@@ -1349,10 +1418,18 @@ int AskConnecting(void) | ||
1349 | 1418 | |
1350 | 1419 | int AskRealHostType(void) |
1351 | 1420 | { |
1421 | + // 同時接続対応 | |
1422 | + HOSTDATA TmpHost; | |
1423 | + TmpHost = CurHost; | |
1424 | + | |
1352 | 1425 | if(AskCurrentHost() != HOSTNUM_NOENTRY) |
1353 | - CopyHostFromListInConnect(AskCurrentHost(), &CurHost); | |
1426 | + // 同時接続対応 | |
1427 | +// CopyHostFromListInConnect(AskCurrentHost(), &CurHost); | |
1428 | + CopyHostFromListInConnect(AskCurrentHost(), &TmpHost); | |
1354 | 1429 | |
1355 | - return(CurHost.HostType); | |
1430 | + // 同時接続対応 | |
1431 | +// return(CurHost.HostType); | |
1432 | + return(TmpHost.HostType); | |
1356 | 1433 | } |
1357 | 1434 | |
1358 | 1435 | /*----- OSS ファイルシステムにアクセスしているかどうかのフラグを変更する ------ |
@@ -3262,3 +3339,9 @@ int AskTransferErrorNotify(void) | ||
3262 | 3339 | return(CurHost.TransferErrorNotify); |
3263 | 3340 | } |
3264 | 3341 | |
3342 | +// セッションあたりの転送量制限対策 | |
3343 | +int AskErrorReconnect(void) | |
3344 | +{ | |
3345 | + return(CurHost.TransferErrorReconnect); | |
3346 | +} | |
3347 | + |
@@ -53,6 +53,14 @@ Changes in Ver.1.99 | ||
53 | 53 | |
54 | 54 | -- Added an option to display file permissions in numbers. |
55 | 55 | |
56 | +-- Added an option to reconnect after transfer errors. | |
57 | + This may work around the limitations on the transfer amount or time per | |
58 | + session. | |
59 | + | |
60 | +-- Fixed bugs that the file transfer might be aborted on operating the main | |
61 | + window if reusing sockets of the main window was enabled and you operated | |
62 | + the main window while files were transferring. | |
63 | + | |
56 | 64 | |
57 | 65 | Outline |
58 | 66 | ------- |
@@ -25,6 +25,14 @@ Changes in Ver.1.99 | ||
25 | 25 | |
26 | 26 | -- Added an option to display file permissions in numbers. |
27 | 27 | |
28 | +-- Added an option to reconnect after transfer errors. | |
29 | + This may work around the limitations on the transfer amount or time per | |
30 | + session. | |
31 | + | |
32 | +-- Fixed bugs that the file transfer might be aborted on operating the main | |
33 | + window if reusing sockets of the main window was enabled and you operated | |
34 | + the main window while files were transferring. | |
35 | + | |
28 | 36 | Changes in Ver.1.98f |
29 | 37 | -------------------- |
30 | 38 |
@@ -52,6 +52,13 @@ Ver 1.99 | ||
52 | 52 | |
53 | 53 | Et@CÌ®«ðÅ\¦·éÝèðÇÁµÜµ½B |
54 | 54 | |
55 | +Et@CÌ]ɸsµ½êÉÄÚ±·éÝèðÇÁµÜµ½B | |
56 | +@±êÉæèZbV ½èÌ]ÊܽÍÔª§À³êÄ¢éêÉ | |
57 | +@»Ì§ÀðñðÅ«éÂ\«ª èÜ·B | |
58 | + | |
59 | +ECEBhEÌ\PbgðÄp·éÝèÅt@CÌ]ÉC | |
60 | +@EBhEðì·éÆ]ɸs·é±Æª éoOðC³µÜµ½B | |
61 | + | |
55 | 62 | |
56 | 63 | Ver 1.96dÈOÖß·ê |
57 | 64 | ----------------------- |
@@ -24,6 +24,13 @@ FFFTP | ||
24 | 24 | |
25 | 25 | Et@CÌ®«ðÅ\¦·éÝèðÇÁµÜµ½B |
26 | 26 | |
27 | +Et@CÌ]ɸsµ½êÉÄÚ±·éÝèðÇÁµÜµ½B | |
28 | +@±êÉæèZbV ½èÌ]ÊܽÍÔª§À³êÄ¢éêÉ | |
29 | +@»Ì§ÀðñðÅ«éÂ\«ª èÜ·B | |
30 | + | |
31 | +ECEBhEÌ\PbgðÄp·éÝèÅt@CÌ]ÉC | |
32 | +@EBhEðì·éÆ]ɸs·é±Æª éoOðC³µÜµ½B | |
33 | + | |
27 | 34 | ¡Ver 1.98f |
28 | 35 | |
29 | 36 | EIð_CAOª³íÉ@\µÈ¢oOðC³µÜµ½B |
@@ -712,6 +712,8 @@ static ULONG WINAPI TransferThread(void *Dummy) | ||
712 | 712 | RECT WndRect; |
713 | 713 | int i; |
714 | 714 | DWORD LastUsed; |
715 | + int LastError; | |
716 | + int Sts; | |
715 | 717 | |
716 | 718 | hWndTrans = NULL; |
717 | 719 | Down = NO; |
@@ -724,6 +726,7 @@ static ULONG WINAPI TransferThread(void *Dummy) | ||
724 | 726 | CmdSkt = INVALID_SOCKET; |
725 | 727 | NewCmdSkt = INVALID_SOCKET; |
726 | 728 | TrnSkt = INVALID_SOCKET; |
729 | + LastError = NO; | |
727 | 730 | SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_LOWEST); |
728 | 731 | |
729 | 732 | while((TransPacketBase != NULL) || |
@@ -767,6 +770,20 @@ static ULONG WINAPI TransferThread(void *Dummy) | ||
767 | 770 | } |
768 | 771 | else |
769 | 772 | { |
773 | + // セッションあたりの転送量制限対策 | |
774 | + if(AskErrorReconnect() == YES && LastError == YES) | |
775 | + { | |
776 | + ReleaseMutex(hListAccMutex); | |
777 | + DoQUIT(TrnSkt, &Canceled[ThreadCount]); | |
778 | + DoClose(TrnSkt); | |
779 | + TrnSkt = INVALID_SOCKET; | |
780 | +// WaitForSingleObject(hListAccMutex, INFINITE); | |
781 | + while(WaitForSingleObject(hListAccMutex, 0) == WAIT_TIMEOUT) | |
782 | + { | |
783 | + BackgrndMessageProc(); | |
784 | + Sleep(1); | |
785 | + } | |
786 | + } | |
770 | 787 | if(TransPacketBase && NewCmdSkt != INVALID_SOCKET && ThreadCount < AskMaxThreadCount()) |
771 | 788 | { |
772 | 789 | ReleaseMutex(hListAccMutex); |
@@ -818,6 +835,7 @@ static ULONG WINAPI TransferThread(void *Dummy) | ||
818 | 835 | } |
819 | 836 | } |
820 | 837 | CmdSkt = NewCmdSkt; |
838 | + LastError = NO; | |
821 | 839 | // if(TransPacketBase != NULL) |
822 | 840 | if(TrnSkt != INVALID_SOCKET && NextTransPacketBase != NULL) |
823 | 841 | { |
@@ -899,7 +917,9 @@ static ULONG WINAPI TransferThread(void *Dummy) | ||
899 | 917 | // { |
900 | 918 | // if(ReConnectTrnSkt() == FFFTP_SUCCESS) |
901 | 919 | // DoDownload(AskTrnCtrlSkt(), TransPacketBase, NO, &Canceled); |
902 | - DoDownload(TrnSkt, Pos, NO, &Canceled[Pos->ThreadCount]); | |
920 | + Sts = DoDownload(TrnSkt, Pos, NO, &Canceled[Pos->ThreadCount]) / 100; | |
921 | + if(Sts != FTP_COMPLETE) | |
922 | + LastError = YES; | |
903 | 923 | // } |
904 | 924 | } |
905 | 925 | } |
@@ -921,7 +941,9 @@ static ULONG WINAPI TransferThread(void *Dummy) | ||
921 | 941 | // { |
922 | 942 | // if(ReConnectTrnSkt() == FFFTP_SUCCESS) |
923 | 943 | // DoUpload(AskTrnCtrlSkt(), TransPacketBase); |
924 | - DoUpload(TrnSkt, Pos); | |
944 | + Sts = DoUpload(TrnSkt, Pos) / 100; | |
945 | + if(Sts != FTP_COMPLETE) | |
946 | + LastError = YES; | |
925 | 947 | // } |
926 | 948 | |
927 | 949 | // ホスト側の日時設定 |
@@ -244,6 +244,8 @@ static void CopyHostToHistory(HOSTDATA *Host, HISTORYDATA *New) | ||
244 | 244 | // 再転送対応 |
245 | 245 | New->TransferErrorMode = Host->TransferErrorMode; |
246 | 246 | New->TransferErrorNotify = Host->TransferErrorNotify; |
247 | + // セッションあたりの転送量制限対策 | |
248 | + New->TransferErrorReconnect = Host->TransferErrorReconnect; | |
247 | 249 | return; |
248 | 250 | } |
249 | 251 |
@@ -311,6 +313,8 @@ void CopyHistoryToHost(HISTORYDATA *Hist, HOSTDATA *Host) | ||
311 | 313 | // 再転送対応 |
312 | 314 | Host->TransferErrorMode = Hist->TransferErrorMode; |
313 | 315 | Host->TransferErrorNotify = Hist->TransferErrorNotify; |
316 | + // セッションあたりの転送量制限対策 | |
317 | + Host->TransferErrorReconnect = Hist->TransferErrorReconnect; | |
314 | 318 | return; |
315 | 319 | } |
316 | 320 |
@@ -1063,6 +1063,8 @@ int CopyHostFromListInConnect(int Num, HOSTDATA *Set) | ||
1063 | 1063 | // 再転送対応 |
1064 | 1064 | Set->TransferErrorMode = Pos->Set.TransferErrorMode; |
1065 | 1065 | Set->TransferErrorNotify = Pos->Set.TransferErrorNotify; |
1066 | + // セッションあたりの転送量制限対策 | |
1067 | + Set->TransferErrorReconnect = Pos->Set.TransferErrorReconnect; | |
1066 | 1068 | Sts = FFFTP_SUCCESS; |
1067 | 1069 | } |
1068 | 1070 | return(Sts); |
@@ -1360,6 +1362,8 @@ void CopyDefaultHost(HOSTDATA *Set) | ||
1360 | 1362 | // 再転送対応 |
1361 | 1363 | Set->TransferErrorMode = EXIST_OVW; |
1362 | 1364 | Set->TransferErrorNotify = YES; |
1365 | + // セッションあたりの転送量制限対策 | |
1366 | + Set->TransferErrorReconnect = NO; | |
1363 | 1367 | return; |
1364 | 1368 | } |
1365 | 1369 |
@@ -2356,6 +2360,7 @@ static INT_PTR CALLBACK Adv3SettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, | ||
2356 | 2360 | SendDlgItemMessage(hDlg, HSET_ERROR_MODE, CB_SETCURSEL, 3, 0); |
2357 | 2361 | else |
2358 | 2362 | SendDlgItemMessage(hDlg, HSET_ERROR_MODE, CB_SETCURSEL, 0, 0); |
2363 | + SendDlgItemMessage(hDlg, HSET_ERROR_RECONNECT, BM_SETCHECK, TmpHost.TransferErrorReconnect, 0); | |
2359 | 2364 | return(TRUE); |
2360 | 2365 | |
2361 | 2366 | case WM_NOTIFY: |
@@ -2387,6 +2392,7 @@ static INT_PTR CALLBACK Adv3SettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, | ||
2387 | 2392 | TmpHost.TransferErrorNotify = NO; |
2388 | 2393 | break; |
2389 | 2394 | } |
2395 | + TmpHost.TransferErrorReconnect = SendDlgItemMessage(hDlg, HSET_ERROR_RECONNECT, BM_GETCHECK, 0, 0); | |
2390 | 2396 | Apply = YES; |
2391 | 2397 | break; |
2392 | 2398 |
@@ -2404,7 +2410,7 @@ static INT_PTR CALLBACK Adv3SettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, | ||
2404 | 2410 | |
2405 | 2411 | // 暗号化通信対応 |
2406 | 2412 | // ホストの暗号化設定を更新 |
2407 | -int SetHostExcryption(int Num, int UseNoEncryption, int UseFTPES, int UseFTPIS, int UseSFTP) | |
2413 | +int SetHostEncryption(int Num, int UseNoEncryption, int UseFTPES, int UseFTPIS, int UseSFTP) | |
2408 | 2414 | { |
2409 | 2415 | int Sts; |
2410 | 2416 | HOSTLISTDATA *Pos; |
@@ -515,6 +515,8 @@ void SaveRegistry(void) | ||
515 | 515 | // 再転送対応 |
516 | 516 | SaveIntNum(hKey5, "ErrMode", Hist.TransferErrorMode, DefaultHist.TransferErrorMode); |
517 | 517 | SaveIntNum(hKey5, "ErrNotify", Hist.TransferErrorNotify, DefaultHist.TransferErrorNotify); |
518 | + // セッションあたりの転送量制限対策 | |
519 | + SaveIntNum(hKey5, "ErrReconnect", Hist.TransferErrorReconnect, DefaultHist.TransferErrorReconnect); | |
518 | 520 | |
519 | 521 | CloseSubKey(hKey5); |
520 | 522 | n++; |
@@ -602,6 +604,8 @@ void SaveRegistry(void) | ||
602 | 604 | // 再転送対応 |
603 | 605 | SaveIntNum(hKey5, "ErrMode", Host.TransferErrorMode, DefaultHost.TransferErrorMode); |
604 | 606 | SaveIntNum(hKey5, "ErrNotify", Host.TransferErrorNotify, DefaultHost.TransferErrorNotify); |
607 | + // セッションあたりの転送量制限対策 | |
608 | + SaveIntNum(hKey5, "ErrReconnect", Host.TransferErrorReconnect, DefaultHost.TransferErrorReconnect); | |
605 | 609 | } |
606 | 610 | CloseSubKey(hKey5); |
607 | 611 | } |
@@ -1022,6 +1026,8 @@ int LoadRegistry(void) | ||
1022 | 1026 | // 再転送対応 |
1023 | 1027 | ReadIntValueFromReg(hKey5, "ErrMode", &Host.TransferErrorMode); |
1024 | 1028 | ReadIntValueFromReg(hKey5, "ErrNotify", &Host.TransferErrorNotify); |
1029 | + // セッションあたりの転送量制限対策 | |
1030 | + ReadIntValueFromReg(hKey5, "ErrReconnect", &Host.TransferErrorReconnect); | |
1025 | 1031 | |
1026 | 1032 | CloseSubKey(hKey5); |
1027 | 1033 |