X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=ssh.c;fp=ssh.c;h=c2af9e8039661d5e7e278c6f6e35920728ba4682;hb=0ab2e03ef2dba047c5e2bd5faf346b42b445fb70;hp=2dc8a081d2f4b94b32db89f05a5802e812f414bb;hpb=8ab1433caaefef02a19e8e5ea74e5259fa719eae;p=PuTTY.git diff --git a/ssh.c b/ssh.c index 2dc8a081..c2af9e80 100644 --- a/ssh.c +++ b/ssh.c @@ -11321,13 +11321,19 @@ static int ssh_return_exitcode(void *handle) } /* - * cfg_info for SSH is the currently running version of the - * protocol. (1 for 1; 2 for 2; 0 for not-decided-yet.) + * cfg_info for SSH is the protocol running in this session. + * (1 or 2 for the full SSH-1 or SSH-2 protocol; -1 for the bare + * SSH-2 connection protocol, i.e. a downstream; 0 for not-decided-yet.) */ static int ssh_cfg_info(void *handle) { Ssh ssh = (Ssh) handle; - return ssh->version; + if (ssh->version == 0) + return 0; /* don't know yet */ + else if (ssh->bare_connection) + return -1; + else + return ssh->version; } /*