1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-01 11:32:48 -05:00

Move TempSeat creation/destruction into Interactor.

Previously, SshProxy dealt with creating a TempSeat to wrap the one it
was borrowing from its client, and then each client in turn dealt with
detecting when it had had its seat borrowed and finishing up with the
TempSeat. The latter involved a lot of code duplication; the former
didn't involve code duplication _yet_ (since SshProxy was the only
thing doing this job), but would have once we started wanting to do
interactive password prompting for other types of network proxy.

Now all of that functionality is centralised into two new Interactor
helper functions: interactor_borrow_seat and interactor_return_seat.
This commit is contained in:
Simon Tatham
2021-10-30 17:45:38 +01:00
parent f00c72cc2a
commit 7460594433
8 changed files with 56 additions and 56 deletions

View File

@ -46,12 +46,6 @@ static void raw_log(Plug *plug, PlugLogType type, SockAddr *addr, int port,
raw->socket_connected = true;
if (raw->ldisc)
ldisc_check_sendok(raw->ldisc);
if (is_tempseat(raw->seat)) {
Seat *ts = raw->seat;
tempseat_flush(ts);
raw->seat = tempseat_get_real(ts);
tempseat_free(ts);
}
}
}