mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 09:58:01 +00:00
When we receive SSH_MSG_DISCONNECT, say so in an error box because
it's likely to be more helpful than `Strange packet received' or whatever. [originally from svn r1250]
This commit is contained in:
parent
c1e38248b1
commit
2e4cefa420
6
ssh.c
6
ssh.c
@ -725,6 +725,7 @@ static int ssh1_rdpkt(unsigned char **data, int *datalen)
|
|||||||
memcpy(buf + nowlen, pktin.body + 4, msglen);
|
memcpy(buf + nowlen, pktin.body + 4, msglen);
|
||||||
buf[nowlen + msglen] = '\0';
|
buf[nowlen + msglen] = '\0';
|
||||||
logevent(buf);
|
logevent(buf);
|
||||||
|
bombout(("Server sent disconnect message:\n\"%s\"", buf+nowlen));
|
||||||
}
|
}
|
||||||
|
|
||||||
crFinish(0);
|
crFinish(0);
|
||||||
@ -898,6 +899,11 @@ static int ssh2_rdpkt(unsigned char **data, int *datalen)
|
|||||||
memcpy(buf + nowlen, pktin.data + 14, msglen);
|
memcpy(buf + nowlen, pktin.data + 14, msglen);
|
||||||
buf[nowlen + msglen] = '\0';
|
buf[nowlen + msglen] = '\0';
|
||||||
logevent(buf);
|
logevent(buf);
|
||||||
|
bombout(("Server sent disconnect message\ntype %d (%s):\n\"%s\"",
|
||||||
|
reason,
|
||||||
|
(reason > 0 && reason < lenof(ssh2_disconnect_reasons)) ?
|
||||||
|
ssh2_disconnect_reasons[reason] : "unknown",
|
||||||
|
buf+nowlen));
|
||||||
}
|
}
|
||||||
|
|
||||||
crFinish(0);
|
crFinish(0);
|
||||||
|
Loading…
Reference in New Issue
Block a user