1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-01 03:22:48 -05:00

Centralise stub plug/socket functions.

In the previous few commits I noticed some repeated work in the form
of pointless empty implementations of Plug's log method, plus some
existing (and some new) empty cases of Socket's endpoint_info. As a
cleanup, I'm replacing as many as I can find with uses of a central
null implementation in the stubs directory.
This commit is contained in:
Simon Tatham
2024-06-29 12:07:59 +01:00
parent 7618e079f5
commit 807ed08da0
12 changed files with 38 additions and 81 deletions

View File

@ -123,11 +123,6 @@ static const char *sshproxy_socket_error(Socket *s)
return sp->errmsg;
}
static SocketEndpointInfo *sshproxy_endpoint_info(Socket *s, bool peer)
{
return NULL;
}
static const SocketVtable SshProxy_sock_vt = {
.plug = sshproxy_plug,
.close = sshproxy_close,
@ -136,7 +131,7 @@ static const SocketVtable SshProxy_sock_vt = {
.write_eof = sshproxy_write_eof,
.set_frozen = sshproxy_set_frozen,
.socket_error = sshproxy_socket_error,
.endpoint_info = sshproxy_endpoint_info,
.endpoint_info = nullsock_endpoint_info,
};
static void sshproxy_eventlog(LogPolicy *lp, const char *event)