1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-06-30 19:12:48 -05:00

Make Socket and Plug into structs.

I think that means that _every_ one of my traitoids is now a struct
containing a vtable pointer as one of its fields (albeit sometimes the
only field), and never just a bare pointer.
This commit is contained in:
Simon Tatham
2018-10-05 07:24:16 +01:00
parent b798230844
commit 884a7df94b
20 changed files with 222 additions and 209 deletions

View File

@ -176,7 +176,7 @@ static void x11_closing(Plug *plug, const char *error_msg, int error_code,
time_to_die = TRUE;
}
struct X11Connection {
const PlugVtable *plugvt;
Plug plug;
};
char *socketname;
@ -809,10 +809,10 @@ void run_agent(void)
disp = x11_setup_display(display, conf);
conn = snew(struct X11Connection);
conn->plugvt = &X11Connection_plugvt;
conn->plug.vt = &X11Connection_plugvt;
s = new_connection(sk_addr_dup(disp->addr),
disp->realhost, disp->port,
0, 1, 0, 0, &conn->plugvt, conf);
0, 1, 0, 0, &conn->plug, conf);
if ((err = sk_socket_error(s)) != NULL) {
fprintf(stderr, "pageant: unable to connect to X server: %s", err);
exit(1);