Forráskód Böngészése

Updating code to PuTTY 96ec2c25

Source commit: bfe02226baaacb28bfc2cf1d1d4566f01f69b582
Martin Prikryl 6 éve
szülő
commit
b6740083df

+ 6 - 6
source/core/PuttyIntf.cpp

@@ -74,7 +74,7 @@ void __fastcall DontSaveRandomSeed()
   SaveRandomSeed = false;
 }
 //---------------------------------------------------------------------------
-TSecureShell * GetSecureShell(Plug plug, bool & pfwd)
+TSecureShell * GetSecureShell(Plug * plug, bool & pfwd)
 {
   if (!is_ssh(plug) && !is_pfwd(plug))
   {
@@ -99,7 +99,7 @@ TSecureShell * GetSecureShell(Plug plug, bool & pfwd)
   return reinterpret_cast<TSecureShell*>(frontend);
 }
 //---------------------------------------------------------------------------
-struct callback_set * get_callback_set(Plug plug)
+struct callback_set * get_callback_set(Plug * plug)
 {
   bool pfwd;
   TSecureShell * SecureShell = GetSecureShell(plug, pfwd);
@@ -111,7 +111,7 @@ struct callback_set * get_frontend_callback_set(Frontend * frontend)
   return reinterpret_cast<TSecureShell *>(frontend)->GetCallbackSet();
 }
 //---------------------------------------------------------------------------
-extern "C" char * do_select(Plug plug, SOCKET skt, int startup)
+extern "C" char * do_select(Plug * plug, SOCKET skt, int startup)
 {
   bool pfwd;
   TSecureShell * SecureShell = GetSecureShell(plug, pfwd);
@@ -372,17 +372,17 @@ void expire_timer_context(void * /*ctx*/)
   // nothing
 }
 //---------------------------------------------------------------------------
-Pinger pinger_new(Conf * /*conf*/, Backend * /*back*/)
+Pinger * pinger_new(Conf * /*conf*/, Backend * /*back*/)
 {
   return NULL;
 }
 //---------------------------------------------------------------------------
-void pinger_reconfig(Pinger /*pinger*/, Conf * /*oldconf*/, Conf * /*newconf*/)
+void pinger_reconfig(Pinger * /*pinger*/, Conf * /*oldconf*/, Conf * /*newconf*/)
 {
   // nothing
 }
 //---------------------------------------------------------------------------
-void pinger_free(Pinger /*pinger*/)
+void pinger_free(Pinger * /*pinger*/)
 {
   // nothing
 }

+ 3 - 3
source/putty/portfwd.c

@@ -1071,16 +1071,16 @@ char *portfwdmgr_connect(PortFwdManager *mgr, Channel **chan_ret,
 
 #include "puttyexp.h"
 
-int is_pfwd(Plug plug)
+int is_pfwd(Plug * plug)
 {
   return
     ((*plug)->closing == pfd_closing) ||
     ((*plug)->closing == pfl_closing);
 }
 
-Frontend * get_pfwd_frontend(Plug plug)
+Frontend * get_pfwd_frontend(Plug * plug)
 {
-  Ssh ssh = NULL;
+  Ssh * ssh = NULL;
   if ((*plug)->closing == pfl_closing)
   {
     struct PortListener *pl = FROMFIELD(plug, struct PortListener, plugvt);

+ 1 - 1
source/putty/proxy.c

@@ -1601,7 +1601,7 @@ int proxy_telnet_negotiate (ProxySocket *p, int change)
 }
 
 #ifdef MPEXT
-ProxySocket * get_proxy_plug_socket(Plug p)
+ProxySocket * get_proxy_plug_socket(Plug * p)
 {
     return FROMFIELD(p, ProxySocket, plugvt);
 }

+ 1 - 1
source/putty/proxy.h

@@ -113,7 +113,7 @@ extern int proxy_socks5_handlechap (ProxySocket *);
 extern int proxy_socks5_selectchap(ProxySocket *);
 
 #ifdef MPEXT
-ProxySocket * get_proxy_plug_socket(Plug p);
+ProxySocket * get_proxy_plug_socket(Plug * p);
 #endif
 
 #endif

+ 1 - 1
source/putty/putty.h

@@ -1669,7 +1669,7 @@ struct callback_set {
 void queue_toplevel_callback(CALLBACK_SET toplevel_callback_fn_t fn, void *ctx);
 int run_toplevel_callbacks(CALLBACK_SET_ONLY);
 int toplevel_callback_pending(CALLBACK_SET_ONLY);
-struct callback_set * get_callback_set(Plug plug);
+struct callback_set * get_callback_set(Plug * plug);
 struct callback_set * get_frontend_callback_set(Frontend * frontend);
 void delete_callbacks_for_context(CALLBACK_SET void *ctx);
 

+ 4 - 4
source/putty/puttyexp.h

@@ -10,9 +10,9 @@ typedef const struct ssh1_cipheralg *ssh1_cipher;
 struct ssh2_cipheralg;
 typedef const struct ssh2_cipheralg *ssh2_cipher;
 
-int is_ssh(Plug plug);
+int is_ssh(Plug * plug);
 int get_ssh_version(Backend * be);
-void * get_ssh_frontend(Plug plug);
+void * get_ssh_frontend(Plug * plug);
 const ssh1_cipher * get_cipher(Backend * be);
 const ssh2_cipher * get_cscipher(Backend * be);
 const ssh2_cipher * get_sccipher(Backend * be);
@@ -35,8 +35,8 @@ void get_macs(int * count, const struct ssh2_macalg *** amacs);
 
 // from portfwd.c
 
-int is_pfwd(Plug plug);
-Frontend * get_pfwd_frontend(Plug plug);
+int is_pfwd(Plug * plug);
+Frontend * get_pfwd_frontend(Plug * plug);
 
 // for winstore.c
 

+ 10 - 10
source/putty/ssh.c

@@ -1122,55 +1122,55 @@ const struct Backend_vtable ssh_backend = {
 
 #include "puttyexp.h"
 
-int is_ssh(Plug plug)
+int is_ssh(Plug * plug)
 {
   return (*plug)->closing == ssh_closing;
 }
 
 int get_ssh_version(Backend * be)
 {
-  Ssh ssh = FROMFIELD(be, struct ssh_tag, backend);
+  Ssh * ssh = FROMFIELD(be, Ssh, backend);
   return ssh->version;
 }
 
-void * get_ssh_frontend(Plug plug)
+void * get_ssh_frontend(Plug * plug)
 {
-  return FROMFIELD(plug, struct ssh_tag, plugvt)->frontend;
+  return FROMFIELD(plug, Ssh, plugvt)->frontend;
 }
 
 const ssh1_cipher * get_cipher(Backend * be)
 {
-  Ssh ssh = FROMFIELD(be, struct ssh_tag, backend);
+  Ssh * ssh = FROMFIELD(be, Ssh, backend);
   return ssh1_bpp_get_cipher(ssh->bpp);
 }
 
 const ssh2_cipher * get_cscipher(Backend * be)
 {
-  Ssh ssh = FROMFIELD(be, struct ssh_tag, backend);
+  Ssh * ssh = FROMFIELD(be, Ssh, backend);
   return ssh2_bpp_get_cscipher(ssh->bpp);
 }
 
 const ssh2_cipher * get_sccipher(Backend * be)
 {
-  Ssh ssh = FROMFIELD(be, struct ssh_tag, backend);
+  Ssh * ssh = FROMFIELD(be, Ssh, backend);
   return ssh2_bpp_get_sccipher(ssh->bpp);
 }
 
 const struct ssh_compressor * get_cscomp(Backend * be)
 {
-  Ssh ssh = FROMFIELD(be, struct ssh_tag, backend);
+  Ssh * ssh = FROMFIELD(be, Ssh, backend);
   return ssh2_bpp_get_cscomp(ssh->bpp);
 }
 
 const struct ssh_decompressor * get_sccomp(Backend * be)
 {
-  Ssh ssh = FROMFIELD(be, struct ssh_tag, backend);
+  Ssh * ssh = FROMFIELD(be, Ssh, backend);
   return ssh2_bpp_get_sccomp(ssh->bpp);
 }
 
 unsigned int winscp_query(Backend * be, int query)
 {
-  Ssh ssh = FROMFIELD(be, struct ssh_tag, backend);
+  Ssh * ssh = FROMFIELD(be, Ssh, backend);
   if ((ssh->base_layer != NULL) && (ssh->base_layer->vt->winscp_query != NULL))
   {
     return ssh_ppl_winscp_query(ssh->base_layer, query);

+ 1 - 1
source/putty/windows/winhsock.c

@@ -13,7 +13,7 @@
 #include "network.h"
 
 #ifdef MPEXT
-extern char *do_select(Plug plug, SOCKET skt, int startup);
+extern char *do_select(Plug * plug, SOCKET skt, int startup);
 #define queue_toplevel_callback(FN, CTX) queue_toplevel_callback(get_callback_set(CTX->plug), FN, CTX)
 #endif
 

+ 2 - 2
source/putty/windows/winnet.c

@@ -958,7 +958,7 @@ static const char *sk_net_socket_error(Socket *s);
 static char *sk_net_peer_info(Socket *s);
 
 #ifdef MPEXT
-extern char *do_select(Plug plug, SOCKET skt, int startup);
+extern char *do_select(Plug * plug, SOCKET skt, int startup);
 #else
 extern char *do_select(SOCKET skt, int startup);
 #endif
@@ -1539,7 +1539,7 @@ Socket *sk_newlistener(const char *srcaddr, int port, Plug *plug,
 static void sk_net_close(Socket *sock)
 {
 #ifdef MPEXT
-    extern char *do_select(Plug plug, SOCKET skt, int startup);
+    extern char *do_select(Plug * plug, SOCKET skt, int startup);
 #else
     extern char *do_select(SOCKET skt, int startup);
 #endif