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

Option to log proxy setup diagnostics to the terminal.

It has three settings: on, off, and 'only until session starts'. The
idea of the last one is that if you use something like 'ssh -v' as
your proxy command, you probably wanted to see the initial SSH
connection-setup messages while you were waiting to see if the
connection would be set up successfully at all, but probably _didn't_
want a slew of diagnostics from rekeys disrupting your terminal in
mid-emacs once the session had got properly under way.

Default is off, to avoid startling people used to the old behaviour. I
wonder if I should have set it more aggressively, though.
This commit is contained in:
Simon Tatham
2015-11-22 14:33:28 +00:00
parent 297efff303
commit 7c65b9c57a
10 changed files with 63 additions and 11 deletions

View File

@ -197,6 +197,7 @@ typedef struct telnet_tag {
int sb_opt, sb_len;
unsigned char *sb_buf;
int sb_size;
int session_started;
enum {
TOP_LEVEL, SEENIAC, SEENWILL, SEENWONT, SEENDO, SEENDONT,
@ -653,7 +654,8 @@ static void telnet_log(Plug plug, int type, SockAddr addr, int port,
{
Telnet telnet = (Telnet) plug;
backend_socket_log(telnet->frontend, type, addr, port,
error_msg, error_code);
error_msg, error_code, telnet->conf,
telnet->session_started);
}
static int telnet_closing(Plug plug, const char *error_msg, int error_code,
@ -687,6 +689,7 @@ static int telnet_receive(Plug plug, int urgent, char *data, int len)
Telnet telnet = (Telnet) plug;
if (urgent)
telnet->in_synch = TRUE;
telnet->session_started = TRUE;
do_telnet_read(telnet, data, len);
return 1;
}
@ -737,6 +740,7 @@ static const char *telnet_init(void *frontend_handle, void **backend_handle,
telnet->state = TOP_LEVEL;
telnet->ldisc = NULL;
telnet->pinger = NULL;
telnet->session_started = TRUE;
*backend_handle = telnet;
/*