浏览代码

Unused code

Source commit: 6d8285f6e0c0e53ffc5d7b22eb1fcfd770368a71
Martin Prikryl 3 年之前
父节点
当前提交
a9c8bf0510
共有 2 个文件被更改,包括 6 次插入18 次删除
  1. 5 17
      source/core/SecureShell.cpp
  2. 1 1
      source/core/SecureShell.h

+ 5 - 17
source/core/SecureShell.cpp

@@ -83,7 +83,10 @@ __fastcall TSecureShell::TSecureShell(TSessionUI* UI,
 __fastcall TSecureShell::~TSecureShell()
 {
   DebugAssert(FWaiting == 0);
-  Active = false;
+  if (Active)
+  {
+    Close();
+  }
   ResetConnection();
   CloseHandle(FSocketEvent);
 }
@@ -409,7 +412,7 @@ void __fastcall TSecureShell::Open()
   // do not use UTF-8 until decided otherwise (see TSCPFileSystem::DetectUtf())
   FUtfStrings = false;
 
-  Active = false;
+  FActive = false;
 
   FAuthenticationLog = L"";
   FNoConnectionResponse = false;
@@ -1669,21 +1672,6 @@ void __fastcall TSecureShell::UpdatePortFwdSocket(SOCKET value, bool Enable)
   }
 }
 //---------------------------------------------------------------------------
-void __fastcall TSecureShell::SetActive(bool value)
-{
-  if (FActive != value)
-  {
-    if (value)
-    {
-      Open();
-    }
-    else
-    {
-      Close();
-    }
-  }
-}
-//---------------------------------------------------------------------------
 void __fastcall TSecureShell::FreeBackend()
 {
   if (FBackendHandle != NULL)

+ 1 - 1
source/core/SecureShell.h

@@ -179,7 +179,7 @@ public:
   UnicodeString __fastcall ConvertFromPutty(const char * Str, int Length);
   struct callback_set * GetCallbackSet();
 
-  __property bool Active = { read = FActive, write = SetActive };
+  __property bool Active = { read = FActive };
   __property bool Ready = { read = GetReady };
   __property TCaptureOutputEvent OnCaptureOutput = { read = FOnCaptureOutput, write = FOnCaptureOutput };
   __property TDateTime LastDataSent = { read = FLastDataSent };