SSH2 channel fix: received WINDOW_ADJUSTs were always applied to the
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Fri, 16 Mar 2001 12:09:44 +0000 (12:09 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Fri, 16 Mar 2001 12:09:44 +0000 (12:09 +0000)
primary (shell session) channel, rather than the one they were aimed
at. This _despite_ me having deliberately gone and looked the channel
ID up in the B-tree - I was ignoring the result by accident :-/

X forwarding should now work in SSH2 even on non-trivial clients (ie
things other than xdpyinfo).

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

ssh.c

diff --git a/ssh.c b/ssh.c
index 72d8edd..a03330e 100644 (file)
--- a/ssh.c
+++ b/ssh.c
@@ -3769,7 +3769,7 @@ static void do_ssh2_authconn(unsigned char *in, int inlen, int ispkt)
                 c = find234(ssh_channels, &i, ssh_channelfind);
                 if (!c)
                     continue;          /* nonexistent channel */
-                mainchan->v2.remwindow += ssh2_pkt_getuint32();
+                c->v2.remwindow += ssh2_pkt_getuint32();
                 try_send = TRUE;
            } else if (pktin.type == SSH2_MSG_CHANNEL_OPEN) {
                 char *type;