channel_read: force window adjusts!
if there's not enough room to receive the data that's being requested, the window adjustment needs to be sent to the remote and thus the force option has to be used. _libssh2_channel_receive_window_adjust() would otherwise "queue" small window adjustments for a later packet but that is really terribly for the small buffer read that for example is the final little piece of a very large file as then there is no logical next packet! Reported by: Armen Babakhanian Bug: http://www.libssh2.org/mail/libssh2-devel-archive-2012-03/0130.shtml
This commit is contained in:
parent
f4f2298ef3
commit
2ea40e63e8
@ -1898,7 +1898,7 @@ libssh2_channel_read_ex(LIBSSH2_CHANNEL *channel, int stream_id, char *buf,
|
|||||||
if(buflen > recv_window) {
|
if(buflen > recv_window) {
|
||||||
BLOCK_ADJUST(rc, channel->session,
|
BLOCK_ADJUST(rc, channel->session,
|
||||||
_libssh2_channel_receive_window_adjust(channel, buflen,
|
_libssh2_channel_receive_window_adjust(channel, buflen,
|
||||||
0, NULL));
|
1, NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
BLOCK_ADJUST(rc, channel->session,
|
BLOCK_ADJUST(rc, channel->session,
|
||||||
|
Loading…
Reference in New Issue
Block a user