OSDN Git Service

Add options to control the behavior of mirroring transfer.
[ffftp/ffftp.git] / main.c
diff --git a/main.c b/main.c
index a1eafc5..4083068 100644 (file)
--- a/main.c
+++ b/main.c
@@ -283,6 +283,10 @@ int AutoCheckForUpdates = YES;
 int AutoApplyUpdates = NO;\r
 int AutoCheckForUptatesInterval = 7;\r
 time_t LastAutoCheckForUpdates = 0;\r
+// ファイル一覧バグ修正\r
+int AbortOnListError = YES;\r
+// ミラーリング設定追加\r
+int MirrorNoTransferContents = NO; \r
 \r
 \r
 \r
@@ -413,9 +417,6 @@ int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLi
        LoadOpenSSL();\r
 #endif\r
 \r
-       // SFTP対応\r
-       LoadPuTTY();\r
-\r
        // ソフトウェア自動更新\r
        ImmediateExit = NO;\r
        pCommand = lpszCmdLine;\r
@@ -507,8 +508,6 @@ int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLi
 #ifdef USE_OPENSSL\r
        FreeOpenSSL();\r
 #endif\r
-       // SFTP対応\r
-       FreePuTTY();\r
        // タスクバー進捗表示\r
        FreeTaskbarList3();\r
        // UPnP対応\r
@@ -701,6 +700,9 @@ static int InitApp(LPSTR lpszCmdLine, int cmdShow)
                \r
                if(masterpass != 0)\r
                {\r
+                       // ホスト共通設定機能\r
+                       ResetDefaultHost();\r
+\r
                        LoadRegistry();\r
 \r
                        // ポータブル版判定\r
@@ -780,7 +782,7 @@ static int InitApp(LPSTR lpszCmdLine, int cmdShow)
                                        DispTransferFiles();\r
 \r
                                        // ソフトウェア自動更新\r
-                                       if(AutoCheckForUptatesInterval == 0)\r
+                                       if(AutoCheckForUpdates == YES && AutoCheckForUptatesInterval == 0)\r
                                                UpdateSoftware(YES, YES, AutoApplyUpdates);\r
 \r
                                        StartupProc(lpszCmdLine);\r
@@ -1157,7 +1159,7 @@ static LRESULT CALLBACK FtpWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARA
                        case 3:\r
                                if(AskUserOpeDisabled() == NO && AskTransferNow() == NO)\r
                                {\r
-                                       if(AutoCheckForUptatesInterval > 0 && time(NULL) - LastAutoCheckForUpdates >= AutoCheckForUptatesInterval * 86400)\r
+                                       if(AutoCheckForUpdates == YES && AutoCheckForUptatesInterval > 0 && time(NULL) - LastAutoCheckForUpdates >= AutoCheckForUptatesInterval * 86400)\r
                                                UpdateSoftware(YES, YES, AutoApplyUpdates);\r
                                }\r
                                break;\r
@@ -1168,7 +1170,7 @@ static LRESULT CALLBACK FtpWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARA
                        // 同時接続対応\r
                        // 中断後に受信バッファに応答が残っていると次のコマンドの応答が正しく処理できない\r
                        if(CancelFlg == YES)\r
-                               RemoveReceivedData(AskCmdCtrlSkt());\r
+                               AbortRecoveryProc();\r
                        switch(LOWORD(wParam))\r
                        {\r
                                case MENU_CONNECT :\r
@@ -2513,6 +2515,9 @@ static void ExitProc(HWND hWnd)
 \r
        CancelFlg = YES;\r
 \r
+       // バグ対策\r
+       DisableUserOpe();\r
+\r
        CloseTransferThread();\r
 \r
        if(SaveExit == YES)\r
@@ -3567,7 +3572,7 @@ BOOL LoadSSLRootCAFile()
                                for(i = 0; i < 5; i++)\r
                                        Hash[i] = _byteswap_ulong(Hash[i]);\r
                                // 同梱する"ssl.pem"に合わせてSHA1ハッシュ値を変更すること\r
-                               if(memcmp(&Hash, &SSLRootCAFileHash, 20) == 0 || memcmp(&Hash, "\xC8\xF6\x0B\x07\x10\x42\x55\xE7\x57\x7F\xE9\x52\xE0\x3F\xA8\xE4\x08\x2B\xB0\xE2", 20) == 0\r
+                               if(memcmp(&Hash, &SSLRootCAFileHash, 20) == 0 || memcmp(&Hash, "\xE8\xE7\x94\x39\x27\x66\xCC\xA1\x52\x88\x58\xA2\x29\xAC\x04\x6B\x0F\x5D\x58\x01", 20) == 0\r
                                        || DialogBox(GetFtpInst(), MAKEINTRESOURCE(updatesslroot_dlg), GetMainHwnd(), ExeEscDialogProc) == YES)\r
                                {\r
                                        memcpy(&SSLRootCAFileHash, &Hash, 20);\r