]> asedeno.scripts.mit.edu Git - PuTTY_svn.git/commitdiff
Use "int" rather than "unsigned" as the argument to ssh2_set_window, not
authorBen Harris <bjh21@bjh21.me.uk>
Mon, 6 Aug 2007 20:56:52 +0000 (20:56 +0000)
committerBen Harris <bjh21@bjh21.me.uk>
Mon, 6 Aug 2007 20:56:52 +0000 (20:56 +0000)
because it can ever be negative, but because we'll be comparing it with
another int.  This way, C's promotion rules don't bite us and we should
stand slightly more chance of coping with broken servers that overrun our
window.

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

ssh.c

diff --git a/ssh.c b/ssh.c
index 7a697a16de74f06bd99018688a77a283016b7132..f78ffbefdab7160ce22da824257719f1538b294f 100644 (file)
--- a/ssh.c
+++ b/ssh.c
@@ -663,7 +663,7 @@ static void ssh_special(void *handle, Telnet_Special);
 static int ssh2_try_send(struct ssh_channel *c);
 static void ssh2_add_channel_data(struct ssh_channel *c, char *buf, int len);
 static void ssh_throttle_all(Ssh ssh, int enable, int bufsize);
-static void ssh2_set_window(struct ssh_channel *c, unsigned newwin);
+static void ssh2_set_window(struct ssh_channel *c, int newwin);
 static int ssh_sendbuffer(void *handle);
 static int ssh_do_close(Ssh ssh, int notify_exit);
 static unsigned long ssh_pkt_getuint32(struct Packet *pkt);
@@ -6172,7 +6172,7 @@ static void ssh2_try_send_and_unthrottle(struct ssh_channel *c)
 /*
  * Potentially enlarge the window on an SSH-2 channel.
  */
-static void ssh2_set_window(struct ssh_channel *c, unsigned newwin)
+static void ssh2_set_window(struct ssh_channel *c, int newwin)
 {
     Ssh ssh = c->ssh;