Pārlūkot izejas kodu

Adjusting parameter names to PuTTY 0.74

Source commit: bc16c10e648d178b9c4a08b7c6a1861b89503ee3
Martin Prikryl 5 gadi atpakaļ
vecāks
revīzija
c91bc6945b
3 mainītis faili ar 18 papildinājumiem un 18 dzēšanām
  1. 3 3
      source/core/PuttyIntf.cpp
  2. 12 12
      source/core/SecureShell.cpp
  3. 3 3
      source/core/SecureShell.h

+ 3 - 3
source/core/PuttyIntf.cpp

@@ -133,17 +133,17 @@ struct callback_set * get_seat_callback_set(Seat * seat)
   return SecureShell->GetCallbackSet();
 }
 //---------------------------------------------------------------------------
-extern "C" char * do_select(Plug * plug, SOCKET skt, bool startup)
+extern "C" char * do_select(Plug * plug, SOCKET skt, bool enable)
 {
   bool pfwd;
   TSecureShell * SecureShell = GetSecureShell(plug, pfwd);
   if (!pfwd)
   {
-    SecureShell->UpdateSocket(skt, startup);
+    SecureShell->UpdateSocket(skt, enable);
   }
   else
   {
-    SecureShell->UpdatePortFwdSocket(skt, startup);
+    SecureShell->UpdatePortFwdSocket(skt, enable);
   }
 
   return NULL;

+ 12 - 12
source/core/SecureShell.cpp

@@ -1535,11 +1535,11 @@ void __fastcall inline TSecureShell::LogEvent(const UnicodeString & Str)
   }
 }
 //---------------------------------------------------------------------------
-void __fastcall TSecureShell::SocketEventSelect(SOCKET Socket, HANDLE Event, bool Startup)
+void __fastcall TSecureShell::SocketEventSelect(SOCKET Socket, HANDLE Event, bool Enable)
 {
   int Events;
 
-  if (Startup)
+  if (Enable)
   {
     Events = (FD_CONNECT | FD_READ | FD_WRITE | FD_OOB | FD_CLOSE | FD_ACCEPT);
   }
@@ -1560,16 +1560,16 @@ void __fastcall TSecureShell::SocketEventSelect(SOCKET Socket, HANDLE Event, boo
       LogEvent(FORMAT(L"Error selecting events %d for socket %d", (int(Events), int(Socket))));
     }
 
-    if (Startup)
+    if (Enable)
     {
       FatalError(FMTLOAD(EVENT_SELECT_ERROR, (WSAGetLastError())));
     }
   }
 }
 //---------------------------------------------------------------------------
-void __fastcall TSecureShell::UpdateSocket(SOCKET value, bool Startup)
+void __fastcall TSecureShell::UpdateSocket(SOCKET value, bool Enable)
 {
-  if (!FActive && !Startup)
+  if (!FActive && !Enable)
   {
     // no-op
     // Remove the branch eventually:
@@ -1581,19 +1581,19 @@ void __fastcall TSecureShell::UpdateSocket(SOCKET value, bool Startup)
   else
   {
     DebugAssert(value);
-    DebugAssert((FActive && (FSocket == value)) || (!FActive && Startup));
+    DebugAssert((FActive && (FSocket == value)) || (!FActive && Enable));
 
     // filter our "local proxy" connection, which have no socket
     if (value != INVALID_SOCKET)
     {
-      SocketEventSelect(value, FSocketEvent, Startup);
+      SocketEventSelect(value, FSocketEvent, Enable);
     }
     else
     {
       DebugAssert(FSessionData->ProxyMethod == pmCmd);
     }
 
-    if (Startup)
+    if (Enable)
     {
       FSocket = value;
       FActive = true;
@@ -1606,16 +1606,16 @@ void __fastcall TSecureShell::UpdateSocket(SOCKET value, bool Startup)
   }
 }
 //---------------------------------------------------------------------------
-void __fastcall TSecureShell::UpdatePortFwdSocket(SOCKET value, bool Startup)
+void __fastcall TSecureShell::UpdatePortFwdSocket(SOCKET value, bool Enable)
 {
   if (Configuration->ActualLogProtocol >= 2)
   {
-    LogEvent(FORMAT(L"Updating forwarding socket %d (%d)", (int(value), int(Startup))));
+    LogEvent(FORMAT(L"Updating forwarding socket %d (%d)", (int(value), int(Enable))));
   }
 
-  SocketEventSelect(value, FSocketEvent, Startup);
+  SocketEventSelect(value, FSocketEvent, Enable);
 
-  if (Startup)
+  if (Enable)
   {
     FPortFwdSockets.insert(value);
   }

+ 3 - 3
source/core/SecureShell.h

@@ -88,7 +88,7 @@ private:
     const UnicodeString & Line);
   void __fastcall ResetConnection();
   void __fastcall ResetSessionInfo();
-  void __fastcall SocketEventSelect(SOCKET Socket, HANDLE Event, bool Startup);
+  void __fastcall SocketEventSelect(SOCKET Socket, HANDLE Event, bool Enable);
   bool __fastcall EnumNetworkEvents(SOCKET Socket, WSANETWORKEVENTS & Events);
   void __fastcall HandleNetworkEvents(SOCKET Socket, WSANETWORKEVENTS & Events);
   bool __fastcall ProcessNetworkEvents(SOCKET Socket);
@@ -153,8 +153,8 @@ public:
   void __fastcall UnregisterReceiveHandler(TNotifyEvent Handler);
 
   // interface to PuTTY core
-  void __fastcall UpdateSocket(SOCKET value, bool Startup);
-  void __fastcall UpdatePortFwdSocket(SOCKET value, bool Startup);
+  void __fastcall UpdateSocket(SOCKET value, bool Enable);
+  void __fastcall UpdatePortFwdSocket(SOCKET value, bool Enable);
   void __fastcall PuttyFatalError(UnicodeString Error);
   TPromptKind __fastcall IdentifyPromptKind(UnicodeString & Name);
   bool __fastcall PromptUser(bool ToServer,