mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-06-30 19:12:48 -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:
@ -191,9 +191,9 @@ static const char *serial_configure(Serial *serial, HANDLE serport, Conf *conf)
|
||||
* Also places the canonical host name into `realhost'. It must be
|
||||
* freed by the caller.
|
||||
*/
|
||||
static const char *serial_init(Seat *seat, Backend **backend_handle,
|
||||
LogContext *logctx, Conf *conf,
|
||||
const char *host, int port,
|
||||
static const char *serial_init(const BackendVtable *vt, Seat *seat,
|
||||
Backend **backend_handle, LogContext *logctx,
|
||||
Conf *conf, const char *host, int port,
|
||||
char **realhost, bool nodelay, bool keepalive)
|
||||
{
|
||||
Serial *serial;
|
||||
@ -209,7 +209,7 @@ static const char *serial_init(Seat *seat, Backend **backend_handle,
|
||||
serial->out = serial->in = NULL;
|
||||
serial->bufsize = 0;
|
||||
serial->break_in_progress = false;
|
||||
serial->backend.vt = &serial_backend;
|
||||
serial->backend.vt = vt;
|
||||
*backend_handle = &serial->backend;
|
||||
|
||||
serial->seat = seat;
|
||||
|
Reference in New Issue
Block a user