From 2e4cefa4200e0f392cf9c5f62f3b8255d03f39ee Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sat, 8 Sep 2001 10:33:56 +0000 Subject: [PATCH] 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] --- ssh.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ssh.c b/ssh.c index c03cd6db..e793412b 100644 --- a/ssh.c +++ b/ssh.c @@ -725,6 +725,7 @@ static int ssh1_rdpkt(unsigned char **data, int *datalen) memcpy(buf + nowlen, pktin.body + 4, msglen); buf[nowlen + msglen] = '\0'; logevent(buf); + bombout(("Server sent disconnect message:\n\"%s\"", buf+nowlen)); } crFinish(0); @@ -898,6 +899,11 @@ static int ssh2_rdpkt(unsigned char **data, int *datalen) memcpy(buf + nowlen, pktin.data + 14, msglen); buf[nowlen + msglen] = '\0'; 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);