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

New Seat method, seat_nonfatal().

This is like the seat-independent nonfatal(), but specifies a Seat,
which allows the GUI dialog box to have the right terminal window as
its parent (if there are multiple ones).

Changed over all the nonfatal() calls in the code base that could be
localised to a Seat, which means all the ones that come up if
something goes horribly wrong in host key storage. To make that
possible, I've added a 'seat' parameter to store_host_key(); it turns
out that all its call sites had one available already.
This commit is contained in:
Simon Tatham
2022-09-13 08:49:38 +01:00
parent c674b2da4f
commit 4249b39ed3
24 changed files with 104 additions and 19 deletions

View File

@ -405,6 +405,14 @@ static void sshproxy_connection_fatal(Seat *seat, const char *message)
}
}
static void sshproxy_nonfatal(Seat *seat, const char *message)
{
SshProxy *sp = container_of(seat, SshProxy, seat);
if (sp->clientseat)
seat_nonfatal(sp->clientseat, "error in proxy SSH connection: %s",
message);
}
static SeatPromptResult sshproxy_confirm_ssh_host_key(
Seat *seat, const char *host, int port, const char *keytype,
char *keystr, SeatDialogText *text, HelpCtx helpctx,
@ -541,6 +549,7 @@ static const SeatVtable SshProxy_seat_vt = {
.notify_remote_exit = nullseat_notify_remote_exit,
.notify_remote_disconnect = sshproxy_notify_remote_disconnect,
.connection_fatal = sshproxy_connection_fatal,
.nonfatal = sshproxy_nonfatal,
.update_specials_menu = nullseat_update_specials_menu,
.get_ttymode = nullseat_get_ttymode,
.set_busy_status = nullseat_set_busy_status,