From 59b7026f487e7e6d642c8e08839c62d653f4a798 Mon Sep 17 00:00:00 2001 From: Markus Friedl Date: Thu, 7 Sep 2000 20:40:31 +0000 Subject: cleanup window and packet sizes for ssh2 flow control; ok niels --- usr.bin/ssh/ssh.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'usr.bin/ssh/ssh.c') diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c index 07d58330c61..4c4b83632e5 100644 --- a/usr.bin/ssh/ssh.c +++ b/usr.bin/ssh/ssh.c @@ -39,7 +39,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh.c,v 1.64 2000/09/07 20:27:54 deraadt Exp $"); +RCSID("$OpenBSD: ssh.c,v 1.65 2000/09/07 20:40:30 markus Exp $"); #include #include @@ -994,18 +994,16 @@ ssh_session2(void) if (daemon(1, 1) < 0) fatal("daemon() failed: %.200s", strerror(errno)); - window = 32*1024; - if (tty_flag) { - packetmax = window/8; - } else { + window = CHAN_SES_WINDOW_DEFAULT; + packetmax = CHAN_SES_PACKET_DEFAULT; + if (!tty_flag) { window *= 2; - packetmax = window/2; + packetmax *=2; } - -/*XXX MAXPACK */ id = channel_new( "session", SSH_CHANNEL_OPENING, in, out, err, - window, packetmax, CHAN_EXTENDED_WRITE, xstrdup("client-session")); + window, packetmax, CHAN_EXTENDED_WRITE, + xstrdup("client-session")); channel_open(id); channel_register_callback(id, SSH2_MSG_CHANNEL_OPEN_CONFIRMATION, client_init, (void *)0); -- cgit v1.2.3