1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-18 11:31:00 -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

@ -93,8 +93,9 @@ static const SshChannelVtable psocks_scvt = {
/* all the rest are NULL */
};
static void psocks_plug_log(Plug *p, PlugLogType type, SockAddr *addr,
int port, const char *error_msg, int error_code);
static void psocks_plug_log(Plug *p, Socket *s, PlugLogType type,
SockAddr *addr, int port,
const char *error_msg, int error_code);
static void psocks_plug_closing(Plug *p, PlugCloseType, const char *error_msg);
static void psocks_plug_receive(Plug *p, int urgent,
const char *data, size_t len);
@ -320,8 +321,9 @@ static void psocks_sc_unthrottle(SshChannel *sc, size_t bufsize)
sk_set_frozen(conn->socket, false);
}
static void psocks_plug_log(Plug *plug, PlugLogType type, SockAddr *addr,
int port, const char *error_msg, int error_code)
static void psocks_plug_log(Plug *plug, Socket *s, PlugLogType type,
SockAddr *addr, int port,
const char *error_msg, int error_code)
{
psocks_connection *conn = container_of(plug, psocks_connection, plug);
char addrbuf[256];