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

At long last: PuTTY will now report its version to the server

sensibly, as a release or a snapshot or a local build. With any luck
this should make bug reporting easier to handle, because anyone who
sends their Event Log should automatically include the version :-)

[originally from svn r1003]
This commit is contained in:
Simon Tatham
2001-03-15 12:15:02 +00:00
parent a405770ec5
commit 080d59422b
3 changed files with 19 additions and 3 deletions

8
ssh.c
View File

@ -1193,7 +1193,8 @@ static int do_ssh_init(unsigned char c) {
/*
* This is a v2 server. Begin v2 protocol.
*/
char *verstring = "SSH-2.0-PuTTY";
char verstring[80];
sprintf(verstring, "SSH-2.0-%s", sshver);
SHA_Init(&exhashbase);
/*
* Hash our version string and their version string.
@ -1212,8 +1213,9 @@ static int do_ssh_init(unsigned char c) {
/*
* This is a v1 server. Begin v1 protocol.
*/
sprintf(vstring, "SSH-%s-PuTTY\n",
(ssh_versioncmp(version, "1.5") <= 0 ? version : "1.5"));
sprintf(vstring, "SSH-%s-%s\n",
(ssh_versioncmp(version, "1.5") <= 0 ? version : "1.5"),
sshver);
sprintf(vlog, "We claim version: %s", vstring);
vlog[strcspn(vlog, "\r\n")] = '\0';
logevent(vlog);