Line
Link Here
|
0 |
-- a/channels.c |
0 |
++ b/channels.c |
Lines 1003-1015
Link Here
|
1003 |
fd_set *readset, fd_set *writeset) |
1003 |
fd_set *readset, fd_set *writeset) |
1004 |
{ |
1004 |
{ |
|
|
1005 |
u_int limit = c->remote_window; |
1006 |
|
1005 |
/* check buffer limits */ |
1007 |
/* check buffer limits */ |
1006 |
if (!c->tcpwinsz || c->dynamic_window > 0) |
1008 |
if (!c->tcpwinsz || c->dynamic_window > 0) |
1007 |
c->tcpwinsz = channel_tcpwinsz(); |
1009 |
c->tcpwinsz = channel_tcpwinsz(); |
1008 |
|
1010 |
|
1009 |
c->remote_window = MIN(c->remote_window, 2 * c->tcpwinsz); |
1011 |
if (c->dynamic_window) |
|
|
1012 |
limit = MIN(limit, 2 * c->tcpwinsz); |
1010 |
|
1013 |
|
1011 |
if (c->istate == CHAN_INPUT_OPEN && |
1014 |
if (c->istate == CHAN_INPUT_OPEN && |
1012 |
c->remote_window > 0 && |
1015 |
limit > 0 && |
1013 |
sshbuf_len(c->input) < c->remote_window && |
1016 |
sshbuf_len(c->input) < limit && |
1014 |
sshbuf_check_reserve(c->input, CHAN_RBUF) == 0) |
1017 |
sshbuf_check_reserve(c->input, CHAN_RBUF) == 0) |
1015 |
FD_SET(c->rfd, readset); |
1018 |
FD_SET(c->rfd, readset); |