svnno****@sourc*****
svnno****@sourc*****
2014年 3月 31日 (月) 15:28:17 JST
Revision: 5562 http://sourceforge.jp/projects/ttssh2/scm/svn/commits/5562 Author: yutakapon Date: 2014-03-31 15:28:16 +0900 (Mon, 31 Mar 2014) Log Message: ----------- チケット #33579 認証ダイアログの表示中に、サーバ側から切断された場合、アプリケーションフォルトで落ちる 問題を修正した。 Ticket Links: ------------ http://sourceforge.jp/projects/ttssh2/tracker/detail/33579 Modified Paths: -------------- trunk/ttssh2/ttxssh/auth.c trunk/ttssh2/ttxssh/hosts.c -------------- next part -------------- Modified: trunk/ttssh2/ttxssh/auth.c =================================================================== --- trunk/ttssh2/ttxssh/auth.c 2014-03-27 15:11:21 UTC (rev 5561) +++ trunk/ttssh2/ttxssh/auth.c 2014-03-31 06:28:16 UTC (rev 5562) @@ -842,6 +842,11 @@ switch (LOWORD(wParam)) { case IDOK: + // \x94F\x8Fؒ\x86\x82ɃT\x81[\x83o\x82\xA9\x82\xE7\x90ؒf\x82\xB3\x82ꂽ\x8Fꍇ\x82́A\x83L\x83\x83\x83\x93\x83Z\x83\x8B\x88\xB5\x82\xA2\x82Ƃ\xB7\x82\xE9\x81B(2014.3.31 yutaka) + if (!pvar->cv->Ready) { + goto canceled; + } + // \x94F\x8F؏\x80\x94\x{142A82}ł\xAB\x82Ă\xA9\x82\xE7\x81A\x94F\x8Ff\x81[\x83^\x82𑗐M\x82\xB7\x82\xE9\x81B\x91\x81\x82\xB7\x82\xAC\x82\xE9\x82ƁA\x97\x8E\x82\xBF\x82\xE9\x81B(2001.1.25 yutaka) if (pvar->userauth_retry_count == 0 && ((pvar->ssh_state.status_flags & STATUS_DONT_SEND_USER_NAME) || @@ -859,6 +864,7 @@ return end_auth_dlg(pvar, dlg); case IDCANCEL: /* kill the connection */ +canceled: pvar->auth_state.auth_dialog = NULL; notify_closed_connection(pvar); EndDialog(dlg, 0); Modified: trunk/ttssh2/ttxssh/hosts.c =================================================================== --- trunk/ttssh2/ttxssh/hosts.c 2014-03-27 15:11:21 UTC (rev 5561) +++ trunk/ttssh2/ttxssh/hosts.c 2014-03-31 06:28:16 UTC (rev 5562) @@ -1392,6 +1392,11 @@ switch (LOWORD(wParam)) { case IDC_CONTINUE: + // \x94F\x8Fؒ\x86\x82ɃT\x81[\x83o\x82\xA9\x82\xE7\x90ؒf\x82\xB3\x82ꂽ\x8Fꍇ\x82́A\x83L\x83\x83\x83\x93\x83Z\x83\x8B\x88\xB5\x82\xA2\x82Ƃ\xB7\x82\xE9\x81B(2014.3.31 yutaka) + if (!pvar->cv->Ready) { + goto canceled; + } + if (IsDlgButtonChecked(dlg, IDC_ADDTOKNOWNHOSTS)) { add_host_key(pvar); } @@ -1413,6 +1418,7 @@ return TRUE; case IDCANCEL: /* kill the connection */ +canceled: pvar->hosts_state.hosts_dialog = NULL; notify_closed_connection(pvar); EndDialog(dlg, 0); @@ -1535,6 +1541,11 @@ switch (LOWORD(wParam)) { case IDC_CONTINUE: + // \x94F\x8Fؒ\x86\x82ɃT\x81[\x83o\x82\xA9\x82\xE7\x90ؒf\x82\xB3\x82ꂽ\x8Fꍇ\x82́A\x83L\x83\x83\x83\x93\x83Z\x83\x8B\x88\xB5\x82\xA2\x82Ƃ\xB7\x82\xE9\x81B(2014.3.31 yutaka) + if (!pvar->cv->Ready) { + goto canceled; + } + if (IsDlgButtonChecked(dlg, IDC_ADDTOKNOWNHOSTS)) { add_host_key(pvar); delete_different_key(pvar); @@ -1557,6 +1568,7 @@ return TRUE; case IDCANCEL: /* kill the connection */ +canceled: pvar->hosts_state.hosts_dialog = NULL; notify_closed_connection(pvar); EndDialog(dlg, 0); @@ -1682,6 +1694,11 @@ switch (LOWORD(wParam)) { case IDC_CONTINUE: + // \x94F\x8Fؒ\x86\x82ɃT\x81[\x83o\x82\xA9\x82\xE7\x90ؒf\x82\xB3\x82ꂽ\x8Fꍇ\x82́A\x83L\x83\x83\x83\x93\x83Z\x83\x8B\x88\xB5\x82\xA2\x82Ƃ\xB7\x82\xE9\x81B(2014.3.31 yutaka) + if (!pvar->cv->Ready) { + goto canceled; + } + if (IsDlgButtonChecked(dlg, IDC_ADDTOKNOWNHOSTS)) { add_host_key(pvar); } @@ -1703,6 +1720,7 @@ return TRUE; case IDCANCEL: /* kill the connection */ +canceled: pvar->hosts_state.hosts_dialog = NULL; notify_closed_connection(pvar); EndDialog(dlg, 0);