From: simon Date: Fri, 7 Sep 2001 22:04:44 +0000 (+0000) Subject: Fix gratuitous assertion failure in Plink (ssh1_throttle_count was X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/commitdiff_plain/90347b9527cc009b4da82d66e758186e8d34da25 Fix gratuitous assertion failure in Plink (ssh1_throttle_count was being decremented far too many times). git-svn-id: svn://svn.tartarus.org/sgt/putty@1238 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/ssh.c b/ssh.c index 36db4e75..845b01cc 100644 --- a/ssh.c +++ b/ssh.c @@ -2709,7 +2709,7 @@ static void ssh1_protocol(unsigned char *in, int inlen, int ispkt) int bufsize = from_backend(pktin.type == SSH1_SMSG_STDERR_DATA, pktin.body + 4, len); - if (bufsize > SSH1_BUFFER_LIMIT) { + if (!ssh1_stdout_throttling && bufsize > SSH1_BUFFER_LIMIT) { ssh1_stdout_throttling = 1; ssh1_throttle(+1); } @@ -2955,7 +2955,7 @@ static void ssh1_protocol(unsigned char *in, int inlen, int ispkt) bufsize = 0; /* agent channels never back up */ break; } - if (bufsize > SSH1_BUFFER_LIMIT) { + if (!c->v.v1.throttling && bufsize > SSH1_BUFFER_LIMIT) { c->v.v1.throttling = 1; ssh1_throttle(+1); } @@ -5113,7 +5113,7 @@ void *new_sock_channel(Socket s) void ssh_unthrottle(int bufsize) { if (ssh_version == 1) { - if (bufsize < SSH1_BUFFER_LIMIT) { + if (ssh1_stdout_throttling && bufsize < SSH1_BUFFER_LIMIT) { ssh1_stdout_throttling = 0; ssh1_throttle(-1); }