When we receive SSH_MSG_DISCONNECT, say so in an error box because
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sat, 8 Sep 2001 10:33:56 +0000 (10:33 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sat, 8 Sep 2001 10:33:56 +0000 (10:33 +0000)
it's likely to be more helpful than `Strange packet received' or
whatever.

git-svn-id: svn://svn.tartarus.org/sgt/putty@1250 cda61777-01e9-0310-a592-d414129be87e

ssh.c

diff --git a/ssh.c b/ssh.c
index c03cd6d..e793412 100644 (file)
--- 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);