]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Experimental checkin to see if we can prevent multiple closes ever
authorSimon Tatham <anakin@pobox.com>
Wed, 11 Apr 2001 12:29:35 +0000 (12:29 +0000)
committerSimon Tatham <anakin@pobox.com>
Wed, 11 Apr 2001 12:29:35 +0000 (12:29 +0000)
being sent on an SSH1 forwarding (or indeed primary) channel.

[originally from svn r1037]

ssh.c

diff --git a/ssh.c b/ssh.c
index 8e5dce7a7fa0b532b1d718cebdfff12689aef87e..8d310e1b470d3d663a0d7f2608b6bf4f834f1625 100644 (file)
--- a/ssh.c
+++ b/ssh.c
@@ -2247,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);