X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=ssh.c;h=48b3f38f1288ffd58821fbc5b1a51a7c3653781e;hb=f662ff790c5bd2d133b8da8c1152c994499ab4f7;hp=959025c4cffbeabb85decac0c6bbc30bc81b6a13;hpb=cda67c7c44bd1b1aef29fa9dc27118aa5ba35e2c;p=PuTTY.git diff --git a/ssh.c b/ssh.c index 959025c4..48b3f38f 100644 --- a/ssh.c +++ b/ssh.c @@ -11241,13 +11241,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; } /*