1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-01 11:32: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

@ -50,8 +50,9 @@ static void plink_echoedit_update(Seat *seat, bool echo, bool edit)
}
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;
BinarySink *bs = is_stderr ? stderr_bs : stdout_bs;
put_data(bs, data, len);

View File

@ -315,7 +315,7 @@ static StripCtrlChars *win_seat_stripctrl_new(
}
static size_t win_seat_output(
Seat *seat, bool is_stderr, const void *, size_t);
Seat *seat, SeatOutputType type, const void *, size_t);
static bool win_seat_eof(Seat *seat);
static int win_seat_get_userpass_input(Seat *seat, prompts_t *p);
static void win_seat_notify_remote_exit(Seat *seat);
@ -5734,7 +5734,7 @@ static void flip_full_screen()
}
}
static size_t win_seat_output(Seat *seat, bool is_stderr,
static size_t win_seat_output(Seat *seat, SeatOutputType type,
const void *data, size_t len)
{
return term_data(term, data, len);