From 4996241bc0b4b487ca55a9722a684b3ad2ba9152 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Mon, 25 Jun 2007 08:20:04 +0000 Subject: Correct test for window updates every three packets; prevents sending window updates for every single packet. ok markus@ --- usr.bin/ssh/channels.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.bin/ssh') diff --git a/usr.bin/ssh/channels.c b/usr.bin/ssh/channels.c index 6a5960becff..7481b21d577 100644 --- a/usr.bin/ssh/channels.c +++ b/usr.bin/ssh/channels.c @@ -1,4 +1,4 @@ -/* $OpenBSD: channels.c,v 1.269 2007/06/11 08:04:44 markus Exp $ */ +/* $OpenBSD: channels.c,v 1.270 2007/06/25 08:20:03 dtucker Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -1640,7 +1640,7 @@ channel_check_window(Channel *c) { if (c->type == SSH_CHANNEL_OPEN && !(c->flags & (CHAN_CLOSE_SENT|CHAN_CLOSE_RCVD)) && - ((c->local_window_max - c->local_window < + ((c->local_window_max - c->local_window > c->local_maxpacket*3) || c->local_window < c->local_window_max/2) && c->local_consumed > 0) { -- cgit v1.2.3