mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-01 19:42:48 -05:00
New plug_closing error type for 'user abort'.
This is generated when setup of a network connection is cancelled by deliberate user action, namely, pressing ^C or ^D or the like at a get_userpass_input prompt presented during proxy setup. It's handled just like normal socket setup errors, except that it omits the call to seat_connection_fatal, on the grounds that in this one case of connection-setup failure, the user doesn't need to be _informed_ that the connection failed - they already know, because they failed it themself on purpose.
This commit is contained in:
@ -606,7 +606,9 @@ static void ssh_socket_log(Plug *plug, PlugLogType type, SockAddr *addr,
|
||||
static void ssh_closing(Plug *plug, PlugCloseType type, const char *error_msg)
|
||||
{
|
||||
Ssh *ssh = container_of(plug, Ssh, plug);
|
||||
if (type != PLUGCLOSE_NORMAL) {
|
||||
if (type == PLUGCLOSE_USER_ABORT) {
|
||||
ssh_user_close(ssh, "%s", error_msg);
|
||||
} else if (type != PLUGCLOSE_NORMAL) {
|
||||
ssh_remote_error(ssh, "%s", error_msg);
|
||||
} else if (ssh->bpp) {
|
||||
ssh->bpp->input_eof = true;
|
||||
|
Reference in New Issue
Block a user