FFFTPのソースコードです。
Revision | 220259b82de9f52909f914b9947e3310c0ff3390 (tree) |
---|---|
Zeit | 2014-11-01 12:12:21 |
Autor | s_kawamoto <s_kawamoto@user...> |
Commiter | s_kawamoto |
Change error handling for file transfer.
Modify documents.
@@ -1669,6 +1669,8 @@ void ReformVMSDirName(char *DirName, int Flg); | ||
1669 | 1669 | #endif |
1670 | 1670 | // 自動切断対策 |
1671 | 1671 | void NoopProc(int Force); |
1672 | +// 同時接続対応 | |
1673 | +void AbortRecoveryProc(void); | |
1672 | 1674 | |
1673 | 1675 | /*===== local.c =====*/ |
1674 | 1676 |
@@ -92,6 +92,8 @@ Changes in Ver.1.99 | ||
92 | 92 | before it. |
93 | 93 | This feature is enabled by default. |
94 | 94 | |
95 | +-- Changed to enable reconnection after transfer errors by default. | |
96 | + | |
95 | 97 | |
96 | 98 | Outline |
97 | 99 | ------- |
@@ -64,6 +64,8 @@ Changes in Ver.1.99 | ||
64 | 64 | before it. |
65 | 65 | This feature is enabled by default. |
66 | 66 | |
67 | +-- Changed to enable reconnection after transfer errors by default. | |
68 | + | |
67 | 69 | Changes in Ver.1.98g2 |
68 | 70 | -------------------- |
69 | 71 |
@@ -96,6 +96,8 @@ Ver 1.99 | ||
96 | 96 | 中止する設定を追加しました。 |
97 | 97 | この機能は既定では有効になります。 |
98 | 98 | |
99 | +・ファイルの転送に失敗した場合に再接続する設定を既定で有効にしました。 | |
100 | + | |
99 | 101 | |
100 | 102 | Ver 1.96d以前へ戻す場合 |
101 | 103 | ----------------------- |
@@ -68,6 +68,8 @@ FFFTP | ||
68 | 68 | 中止する設定を追加しました。 |
69 | 69 | この機能は既定では有効になります。 |
70 | 70 | |
71 | +・ファイルの転送に失敗した場合に再接続する設定を既定で有効にしました。 | |
72 | + | |
71 | 73 | ■Ver 1.98g2 |
72 | 74 | |
73 | 75 | ・インストーラ版にZIP版のファイルが混入していた問題を修正しました。 |
@@ -3787,3 +3787,22 @@ void NoopProc(int Force) | ||
3787 | 3787 | } |
3788 | 3788 | } |
3789 | 3789 | |
3790 | +// 同時接続対応 | |
3791 | +void AbortRecoveryProc(void) | |
3792 | +{ | |
3793 | + CancelFlg = NO; | |
3794 | + if(AskReuseCmdSkt() == NO || AskShareProh() == YES || AskTransferNow() == NO) | |
3795 | + { | |
3796 | + if(AskErrorReconnect() == YES) | |
3797 | + { | |
3798 | + DisableUserOpe(); | |
3799 | + ReConnectCmdSkt(); | |
3800 | + GetRemoteDirForWnd(CACHE_REFRESH, &CancelFlg); | |
3801 | + EnableUserOpe(); | |
3802 | + } | |
3803 | + else | |
3804 | + RemoveReceivedData(AskCmdCtrlSkt()); | |
3805 | + } | |
3806 | + return; | |
3807 | +} | |
3808 | + |
@@ -1435,7 +1435,7 @@ void CopyDefaultDefaultHost(HOSTDATA *Set) | ||
1435 | 1435 | Set->TransferErrorMode = EXIST_OVW; |
1436 | 1436 | Set->TransferErrorNotify = YES; |
1437 | 1437 | // セッションあたりの転送量制限対策 |
1438 | - Set->TransferErrorReconnect = NO; | |
1438 | + Set->TransferErrorReconnect = YES; | |
1439 | 1439 | return; |
1440 | 1440 | } |
1441 | 1441 |
@@ -1167,8 +1167,8 @@ static LRESULT CALLBACK FtpWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARA | ||
1167 | 1167 | case WM_COMMAND : |
1168 | 1168 | // 同時接続対応 |
1169 | 1169 | // 中断後に受信バッファに応答が残っていると次のコマンドの応答が正しく処理できない |
1170 | - if(CancelFlg == YES) | |
1171 | - RemoveReceivedData(AskCmdCtrlSkt()); | |
1170 | + if(AskUserOpeDisabled() == NO && CancelFlg == YES) | |
1171 | + AbortRecoveryProc(); | |
1172 | 1172 | switch(LOWORD(wParam)) |
1173 | 1173 | { |
1174 | 1174 | case MENU_CONNECT : |
@@ -2513,6 +2513,9 @@ static void ExitProc(HWND hWnd) | ||
2513 | 2513 | |
2514 | 2514 | CancelFlg = YES; |
2515 | 2515 | |
2516 | + // バグ対策 | |
2517 | + DisableUserOpe(); | |
2518 | + | |
2516 | 2519 | CloseTransferThread(); |
2517 | 2520 | |
2518 | 2521 | if(SaveExit == YES) |