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:
10
ssh.c
10
ssh.c
@ -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;
|
||||
|
Reference in New Issue
Block a user