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

seat_output: add an output type for SSH banners. (NFC)

The jump host system ought really to be treating SSH authentication
banners as a distinct thing from the standard-error session output, so
that the former can be presented to the user in the same way as the
auth banner for the main session.

This change converts the 'bool is_stderr' parameter of seat_output()
into an enumerated type with three values. For the moment, stderr and
banners are treated the same, but the plan is for that to change.
This commit is contained in:
Simon Tatham
2021-09-16 14:46:49 +01:00
parent a45ae81797
commit ac47e550c6
12 changed files with 70 additions and 43 deletions

View File

@ -352,8 +352,9 @@ size_t try_output(bool is_stderr)
}
static size_t plink_output(
Seat *seat, bool is_stderr, const void *data, size_t len)
Seat *seat, SeatOutputType type, const void *data, size_t len)
{
bool is_stderr = type != SEAT_OUTPUT_STDOUT;
assert(is_stderr || outgoingeof == EOF_NO);
BinarySink *bs = is_stderr ? stderr_bs : stdout_bs;

View File

@ -318,7 +318,7 @@ static char *gtk_seat_get_ttymode(Seat *seat, const char *mode)
return term_get_ttymode(inst->term, mode);
}
static size_t gtk_seat_output(Seat *seat, bool is_stderr,
static size_t gtk_seat_output(Seat *seat, SeatOutputType type,
const void *data, size_t len)
{
GtkFrontend *inst = container_of(seat, GtkFrontend, seat);