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:
@ -13,18 +13,6 @@
|
||||
|
||||
const bool ssh_proxy_supported = true;
|
||||
|
||||
/*
|
||||
* TODO for future work:
|
||||
*
|
||||
* If the user manually aborts the attempt to make the proxy SSH
|
||||
* connection (e.g. by hitting ^C at a userpass prompt, or refusing to
|
||||
* accept the proxy server's host key), then I think it would be nicer
|
||||
* if we didn't give a connection_fatal error box. If I've aborted the
|
||||
* connection deliberately, I don't need to be told it happened, and
|
||||
* I'd rather not have the UI annoyance of clicking away an extra
|
||||
* error dialog.
|
||||
*/
|
||||
|
||||
typedef struct SshProxy {
|
||||
char *errmsg;
|
||||
Conf *conf;
|
||||
@ -318,6 +306,8 @@ static void sshproxy_send_close(SshProxy *sp)
|
||||
|
||||
if (sp->errmsg)
|
||||
plug_closing_error(sp->plug, sp->errmsg);
|
||||
else if (!sp->conn_established && backend_exitcode(sp->backend) == 0)
|
||||
plug_closing_user_abort(sp->plug);
|
||||
else
|
||||
plug_closing_normal(sp->plug);
|
||||
}
|
||||
|
Reference in New Issue
Block a user