1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 09:58:01 +00:00

Don't send SSH_MSG_CHANNEL_WINDOW_ADJUST with a zero adjustment.

This commit is contained in:
Ben Harris 2016-05-17 16:28:56 +02:00
parent 0e1b0e24c1
commit e06833b46b

7
ssh.c
View File

@ -7883,7 +7883,8 @@ static void ssh_channel_unthrottle(struct ssh_channel *c, int bufsize)
buflimit = 0; buflimit = 0;
else else
buflimit = c->v.v2.locmaxwin; buflimit = c->v.v2.locmaxwin;
ssh2_set_window(c, bufsize < buflimit ? buflimit - bufsize : 0); if (bufsize < buflimit)
ssh2_set_window(c, buflimit - bufsize);
} }
if (c->throttling_conn && bufsize <= buflimit) { if (c->throttling_conn && bufsize <= buflimit) {
c->throttling_conn = 0; c->throttling_conn = 0;
@ -8115,8 +8116,8 @@ static void ssh2_msg_channel_data(Ssh ssh, struct Packet *pktin)
* need to adjust the window if the server's * need to adjust the window if the server's
* sent excess data. * sent excess data.
*/ */
ssh2_set_window(c, bufsize < c->v.v2.locmaxwin ? if (bufsize < c->v.v2.locmaxwin)
c->v.v2.locmaxwin - bufsize : 0); ssh2_set_window(c, c->v.v2.locmaxwin - bufsize);
/* /*
* If we're either buffering way too much data, or if we're * If we're either buffering way too much data, or if we're
* buffering anything at all and we're in "simple" mode, * buffering anything at all and we're in "simple" mode,