aboutsummaryrefslogtreecommitdiff
path: root/src/channels.c
diff options
context:
space:
mode:
authormilo <milo@r0ot.me>2010-10-01 22:33:27 +0200
committerAris Adamantiadis <aris@0xbadc0de.be>2010-10-02 22:55:53 +0200
commit3d8cfa9973a874b537a2cdd5c6a5d9b38473d971 (patch)
tree6057561b26ce0cb2f29f5cdd0620bdcbf33c2889 /src/channels.c
parent0d5cc01f1c0ca824d01e5f50cecc6ff129482e22 (diff)
downloadlibssh-3d8cfa9973a874b537a2cdd5c6a5d9b38473d971.tar.gz
libssh-3d8cfa9973a874b537a2cdd5c6a5d9b38473d971.tar.xz
libssh-3d8cfa9973a874b537a2cdd5c6a5d9b38473d971.zip
Don't grow window if there is no space in the buffer
Diffstat (limited to 'src/channels.c')
-rw-r--r--src/channels.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/channels.c b/src/channels.c
index 99443029..9d726fe5 100644
--- a/src/channels.c
+++ b/src/channels.c
@@ -516,7 +516,7 @@ SSH_PACKET_CALLBACK(channel_rcv_data){
if(rest > 0) {
buffer_pass_bytes(buf, rest);
}
- if (channel->local_window < WINDOWLIMIT) {
+ if (channel->local_window + buffer_get_rest_len(buf) < WINDOWLIMIT) {
if (grow_window(session, channel, 0) < 0) {
leave_function();
return -1;