X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/9275ca8aed9b69e7b62eab751342833eb637ff1d..824e9f94230b6979e64a4e4fb8e4f535e641a844:/ssh.c diff --git a/ssh.c b/ssh.c index dba040bd..8d310e1b 100644 --- a/ssh.c +++ b/ssh.c @@ -1128,7 +1128,9 @@ static void ssh_detect_bugs(char *vstring) { char *imp; /* pointer to implementation part */ imp = vstring; imp += strcspn(imp, "-"); + if (*imp) imp++; imp += strcspn(imp, "-"); + if (*imp) imp++; ssh_remote_bugs = 0; @@ -2245,7 +2247,8 @@ static void ssh1_protocol(unsigned char *in, int inlen, int ispkt) { if (c) { int closetype; closetype = (pktin.type == SSH1_MSG_CHANNEL_CLOSE ? 1 : 2); - send_packet(pktin.type, PKT_INT, c->remoteid, PKT_END); + if (!(c->closes & closetype)) + send_packet(pktin.type, PKT_INT, c->remoteid, PKT_END); if ((c->closes == 0) && (c->type == CHAN_X11)) { logevent("X11 connection closed"); assert(c->u.x11.s != NULL);