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

@ -1021,7 +1021,7 @@ void ssh2kex_coroutine(struct ssh2_transport_state *s, bool *aborted)
ppl_logevent("%s", fingerprint);
sfree(fingerprint);
store_host_key(s->savedhost, s->savedport,
store_host_key(s->ppl.seat, s->savedhost, s->savedport,
ssh_key_cache_id(s->hkey), s->keystr);
/*
* Don't forget to store the new key as the one we'll be

View File

@ -116,6 +116,7 @@ static const SeatVtable server_seat_vt = {
.notify_remote_exit = nullseat_notify_remote_exit,
.notify_remote_disconnect = nullseat_notify_remote_disconnect,
.connection_fatal = nullseat_connection_fatal,
.nonfatal = nullseat_nonfatal,
.update_specials_menu = nullseat_update_specials_menu,
.get_ttymode = nullseat_get_ttymode,
.set_busy_status = nullseat_set_busy_status,

View File

@ -193,6 +193,7 @@ static const SeatVtable sesschan_seat_vt = {
.notify_remote_exit = sesschan_notify_remote_exit,
.notify_remote_disconnect = nullseat_notify_remote_disconnect,
.connection_fatal = sesschan_connection_fatal,
.nonfatal = nullseat_nonfatal,
.update_specials_menu = nullseat_update_specials_menu,
.get_ttymode = nullseat_get_ttymode,
.set_busy_status = nullseat_set_busy_status,