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

Introduce a typedef for frontend handles.

This is another major source of unexplained 'void *' parameters
throughout the code.

In particular, the currently unused testback.c actually gave the wrong
pointer type to its internal store of the frontend handle - it cast
the input void * to a Terminal *, from which it got implicitly cast
back again when calling from_backend, and nobody noticed. Now it uses
the right type internally as well as externally.
This commit is contained in:
Simon Tatham
2018-09-12 09:10:51 +01:00
parent eefebaaa9e
commit 8dfb2a1186
40 changed files with 357 additions and 406 deletions

View File

@ -95,7 +95,8 @@ Socket new_connection(SockAddr addr, const char *hostname,
Socket new_listener(const char *srcaddr, int port, Plug plug,
int local_host_only, Conf *conf, int addressfamily);
SockAddr name_lookup(const char *host, int port, char **canonicalname,
Conf *conf, int addressfamily, void *frontend_for_logging,
Conf *conf, int addressfamily,
Frontend *frontend_for_logging,
const char *lookup_reason_for_logging);
int proxy_for_destination (SockAddr addr, const char *hostname, int port,
Conf *conf);
@ -221,7 +222,7 @@ extern Plug nullplug;
/*
* Exports from be_misc.c.
*/
void backend_socket_log(void *frontend, int type, SockAddr addr, int port,
void backend_socket_log(Frontend *frontend, int type, SockAddr addr, int port,
const char *error_msg, int error_code, Conf *conf,
int session_started);
void log_proxy_stderr(Plug plug, bufchain *buf, const void *vdata, int len);