Don't grow window if there is no space in the buffer

This commit is contained in:
milo
2010-10-01 22:33:27 +02:00
committed by Aris Adamantiadis
parent 0d5cc01f1c
commit 3d8cfa9973

View File

@@ -516,7 +516,7 @@ SSH_PACKET_CALLBACK(channel_rcv_data){
if(rest > 0) { if(rest > 0) {
buffer_pass_bytes(buf, rest); 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) { if (grow_window(session, channel, 0) < 0) {
leave_function(); leave_function();
return -1; return -1;