Tweak window handling so that we send a window adjust if the window is half
authorben <ben@cda61777-01e9-0310-a592-d414129be87e>
Sat, 4 Aug 2007 16:04:08 +0000 (16:04 +0000)
committerben <ben@cda61777-01e9-0310-a592-d414129be87e>
Sat, 4 Aug 2007 16:04:08 +0000 (16:04 +0000)
used up, rather than over half.  That this increases the throughput of PSCP
by 50% indicates just how broken our window handling is.

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

ssh.c

diff --git a/ssh.c b/ssh.c
index 0a82355..08741ab 100644 (file)
--- a/ssh.c
+++ b/ssh.c
@@ -6187,7 +6187,7 @@ static void ssh2_set_window(struct ssh_channel *c, unsigned newwin)
      *
      * "Significant" is arbitrarily defined as half the window size.
      */
-    if (newwin > c->v.v2.locwindow * 2) {
+    if (newwin >= c->v.v2.locwindow * 2) {
        struct Packet *pktout;
 
        pktout = ssh2_pkt_init(SSH2_MSG_CHANNEL_WINDOW_ADJUST);