1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-06-30 19:12:48 -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

@ -306,7 +306,7 @@ static void fdsocket_select_result_input_error(int fd, int event)
retd = read(fd, buf, sizeof(buf));
if (retd > 0) {
log_proxy_stderr(fds->plug, &fds->psb, buf, retd);
log_proxy_stderr(fds->plug, &fds->sock, &fds->psb, buf, retd);
} else {
del234(fdsocket_by_inerrfd, fds);
uxsel_del(fds->inerrfd);
@ -334,8 +334,8 @@ static const SocketVtable FdSocket_sockvt = {
static void fdsocket_connect_success_callback(void *ctx)
{
FdSocket *fds = (FdSocket *)ctx;
plug_log(fds->plug, PLUGLOG_CONNECT_SUCCESS, fds->addr, fds->port,
NULL, 0);
plug_log(fds->plug, &fds->sock, PLUGLOG_CONNECT_SUCCESS,
fds->addr, fds->port, NULL, 0);
}
void setup_fd_socket(Socket *s, int infd, int outfd, int inerrfd)