1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-05 21:42:47 -05:00

Pass the calling Socket to plug_log.

This enables plug_log to run query methods on the socket in order to
find out useful information to log. I don't expect it's sensible to do
anything else with it.
This commit is contained in:
Simon Tatham
2024-06-26 08:29:39 +01:00
parent 23b15dbc77
commit c1d9da67a2
27 changed files with 94 additions and 80 deletions

View File

@ -600,8 +600,9 @@ void ssh_sw_abort_deferred(Ssh *ssh, const char *fmt, ...)
}
}
static void ssh_socket_log(Plug *plug, PlugLogType type, SockAddr *addr,
int port, const char *error_msg, int error_code)
static void ssh_socket_log(Plug *plug, Socket *s, PlugLogType type,
SockAddr *addr, int port,
const char *error_msg, int error_code)
{
Ssh *ssh = container_of(plug, Ssh, plug);
@ -615,7 +616,7 @@ static void ssh_socket_log(Plug *plug, PlugLogType type, SockAddr *addr,
*/
if (!ssh->attempting_connshare)
backend_socket_log(ssh->seat, ssh->logctx, type, addr, port,
backend_socket_log(ssh->seat, ssh->logctx, s, type, addr, port,
error_msg, error_code, ssh->conf,
ssh->session_started);
}