[channels.c]
     increase the SSH v2 window size to 4 packets. comsumes a little
     bit more memory for slow receivers but increases througput.
This commit is contained in:
Damien Miller 2002-02-19 15:20:08 +11:00
parent 7af3d10588
commit 2aa0c1995c
2 changed files with 8 additions and 5 deletions

View File

@ -5,6 +5,10 @@
When you give command examples and etc., in a manual page prefix them with: $ command When you give command examples and etc., in a manual page prefix them with: $ command
or or
# command # command
- markus@cvs.openbsd.org 2002/02/14 23:27:59
[channels.c]
increase the SSH v2 window size to 4 packets. comsumes a little
bit more memory for slow receivers but increases througput.
20020218 20020218
- (tim) newer config.guess from ftp://ftp.gnu.org/gnu/config/config.guess - (tim) newer config.guess from ftp://ftp.gnu.org/gnu/config/config.guess
@ -7602,4 +7606,4 @@
- Wrote replacements for strlcpy and mkdtemp - Wrote replacements for strlcpy and mkdtemp
- Released 1.0pre1 - Released 1.0pre1
$Id: ChangeLog,v 1.1855 2002/02/19 04:19:42 djm Exp $ $Id: ChangeLog,v 1.1856 2002/02/19 04:20:08 djm Exp $

View File

@ -39,7 +39,7 @@
*/ */
#include "includes.h" #include "includes.h"
RCSID("$OpenBSD: channels.c,v 1.167 2002/02/06 14:55:15 markus Exp $"); RCSID("$OpenBSD: channels.c,v 1.168 2002/02/14 23:27:59 markus Exp $");
#include "ssh.h" #include "ssh.h"
#include "ssh1.h" #include "ssh1.h"
@ -644,15 +644,14 @@ channel_register_filter(int id, channel_filter_fn *fn)
void void
channel_set_fds(int id, int rfd, int wfd, int efd, channel_set_fds(int id, int rfd, int wfd, int efd,
int extusage, int nonblock) int extusage, int nonblock, u_int window_max)
{ {
Channel *c = channel_lookup(id); Channel *c = channel_lookup(id);
if (c == NULL || c->type != SSH_CHANNEL_LARVAL) if (c == NULL || c->type != SSH_CHANNEL_LARVAL)
fatal("channel_activate for non-larval channel %d.", id); fatal("channel_activate for non-larval channel %d.", id);
channel_register_fds(c, rfd, wfd, efd, extusage, nonblock); channel_register_fds(c, rfd, wfd, efd, extusage, nonblock);
c->type = SSH_CHANNEL_OPEN; c->type = SSH_CHANNEL_OPEN;
/* XXX window size? */ c->local_window = c->local_window_max = window_max;
c->local_window = c->local_window_max = c->local_maxpacket * 2;
packet_start(SSH2_MSG_CHANNEL_WINDOW_ADJUST); packet_start(SSH2_MSG_CHANNEL_WINDOW_ADJUST);
packet_put_int(c->remote_id); packet_put_int(c->remote_id);
packet_put_int(c->local_window); packet_put_int(c->local_window);