//--------------------------------------------------------------------------- void __fastcall TTerminalManager::ReconnectActiveTerminal() { assert(ActiveTerminal); if (ScpExplorer) { if (ScpExplorer->Terminal == ActiveTerminal) { ScpExplorer->UpdateTerminal(ActiveTerminal); } } try { if (FTerminalPendingAction == tpNull) { ConnectActiveTerminalImpl(true); } else { FTerminalPendingAction = tpReconnect; } } catch(...) { FreeActiveTerminal(); throw; } }
//--------------------------------------------------------------------------- bool __fastcall TTerminalManager::ConnectActiveTerminal() { ActiveTerminal->CollectUsage(); // add only stored sessions to the jump list, // ad-hoc session cannot be reproduced from just a session name if (StoredSessions->FindSame(ActiveTerminal->SessionData) != NULL) { WinConfiguration->AddSessionToJumpList(ActiveTerminal->SessionData->SessionName); } bool Result = ConnectActiveTerminalImpl(false); if (!Result) { Configuration->Usage->Inc(L"OpenedSessionsFailed"); } if (Result && WinConfiguration->AutoOpenInPutty && CanOpenInPutty()) { try { OpenInPutty(); } catch(Exception & E) { ShowExtendedExceptionEx(NULL, &E); } } return Result; }
//--------------------------------------------------------------------------- bool __fastcall TTerminalManager::ConnectActiveTerminal() { ActiveTerminal->CollectUsage(); // add only stored sessions to the jump list, // ad-hoc session cannot be reproduced from just a session name if (StoredSessions->FindSame(ActiveTerminal->SessionData) != NULL) { WinConfiguration->AddSessionToJumpList(ActiveTerminal->SessionData->SessionName); } FAuthenticationCancelled = false; bool Result = ConnectActiveTerminalImpl(false); UnicodeString DateStamp = StandardDatestamp(); if (Result) { if (Configuration->Usage->Get(L"OpenedSessionsFailedLastDate") == DateStamp) { Configuration->Usage->Inc(L"OpenedSessionsFailedRecovered"); } } else { Configuration->Usage->Inc(L"OpenedSessionsFailed"); Configuration->Usage->Set(L"OpenedSessionsFailedLastDate", DateStamp); if (FAuthenticationCancelled) { Configuration->Usage->Inc(L"OpenedSessionsFailedAfterCancel"); } } if (Result && WinConfiguration->AutoOpenInPutty && CanOpenInPutty()) { try { OpenInPutty(); } catch(Exception & E) { ShowExtendedExceptionEx(NULL, &E); } } return Result; }