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

Pass the BackendVtable pointer to backend_init.

Now I can have multiple BackendVtable structures sharing all their
function pointers, and still tell which is which when init is setting
things up.
This commit is contained in:
Simon Tatham
2020-02-16 11:43:20 +00:00
parent 91c2e6b4d5
commit 0a09c12edc
9 changed files with 50 additions and 47 deletions

10
ssh.c
View File

@ -866,10 +866,10 @@ static void ssh_cache_conf_values(Ssh *ssh)
*
* Returns an error message, or NULL on success.
*/
static const char *ssh_init(Seat *seat, Backend **backend_handle,
LogContext *logctx, Conf *conf,
const char *host, int port, char **realhost,
bool nodelay, bool keepalive)
static const char *ssh_init(const BackendVtable *vt, Seat *seat,
Backend **backend_handle, LogContext *logctx,
Conf *conf, const char *host, int port,
char **realhost, bool nodelay, bool keepalive)
{
const char *p;
Ssh *ssh;
@ -891,7 +891,7 @@ static const char *ssh_init(Seat *seat, Backend **backend_handle,
ssh->term_width = conf_get_int(ssh->conf, CONF_width);
ssh->term_height = conf_get_int(ssh->conf, CONF_height);
ssh->backend.vt = &ssh_backend;
ssh->backend.vt = vt;
*backend_handle = &ssh->backend;
ssh->seat = seat;