mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-03 04:22:47 -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
unix/uxser.c
10
unix/uxser.c
@ -279,10 +279,10 @@ static const char *serial_configure(Serial *serial, 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, char **realhost,
|
||||
bool nodelay, bool keepalive)
|
||||
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;
|
||||
const char *err;
|
||||
@ -292,7 +292,7 @@ static const char *serial_init(Seat *seat, Backend **backend_handle,
|
||||
seat_set_trust_status(seat, false);
|
||||
|
||||
serial = snew(Serial);
|
||||
serial->backend.vt = &serial_backend;
|
||||
serial->backend.vt = vt;
|
||||
*backend_handle = &serial->backend;
|
||||
|
||||
serial->seat = seat;
|
||||
|
Reference in New Issue
Block a user