X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=ssh.c;h=ef503bf52160e96503828ad72bbd5d67c377031e;hb=a580c22c2419a9236466ca8ee80bc97bc9da41eb;hp=b4c634d310c363930e7ecb5fda19358af1a107b3;hpb=49927f6c4dc619865ade72fabd0f659726bc0908;p=PuTTY.git diff --git a/ssh.c b/ssh.c index b4c634d3..ef503bf5 100644 --- a/ssh.c +++ b/ssh.c @@ -4266,13 +4266,13 @@ void sshfwd_unclean_close(struct ssh_channel *c) if (ssh->state == SSH_STATE_CLOSED) return; - if (c->closes & CLOSES_SENT_CLOSE) - return; + if (!(c->closes & CLOSES_SENT_CLOSE)) { + pktout = ssh2_pkt_init(SSH2_MSG_CHANNEL_CLOSE); + ssh2_pkt_adduint32(pktout, c->remoteid); + ssh2_pkt_send(ssh, pktout); + c->closes |= CLOSES_SENT_EOF | CLOSES_SENT_CLOSE; + } - pktout = ssh2_pkt_init(SSH2_MSG_CHANNEL_CLOSE); - ssh2_pkt_adduint32(pktout, c->remoteid); - ssh2_pkt_send(ssh, pktout); - c->closes |= CLOSES_SENT_EOF | CLOSES_SENT_CLOSE; switch (c->type) { case CHAN_X11: x11_close(c->u.x11.s); @@ -4283,6 +4283,7 @@ void sshfwd_unclean_close(struct ssh_channel *c) break; } c->type = CHAN_ZOMBIE; + ssh2_channel_check_close(c); } @@ -5777,6 +5778,12 @@ static int do_ssh2_transport(Ssh ssh, void *vin, int inlen, break; } } + if (!ssh->hostkey) { + bombout(("Couldn't agree a host key algorithm (available: %s)", + str ? str : "(null)")); + crStop(0); + } + s->guessok = s->guessok && first_in_commasep_string(hostkey_algs[0]->name, str, len); ssh_pkt_getstring(pktin, &str, &len); /* client->server cipher */ @@ -10036,6 +10043,12 @@ static void ssh_unthrottle(void *handle, int bufsize) } } } + + /* + * Now process any SSH connection data that was stashed in our + * queue while we were frozen. + */ + ssh_process_queued_incoming_data(ssh); } void ssh_send_port_open(void *channel, char *hostname, int port, char *org)