1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-08-10 06:23:01 +03:00

Fix a infinite loop on error.

Thanks to Milo for the pointer.


git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@776 7dcaeef0-15fb-0310-b436-a5af3365683c
This commit is contained in:
Andreas Schneider
2009-06-10 15:29:11 +00:00
parent 848984f25f
commit d14a492019

View File

@@ -904,7 +904,9 @@ int channel_write(CHANNEL *channel, const void *data, u32 len) {
/* What happens when the channel window is zero? */
while(channel->remote_window == 0) {
/* parse every incoming packet */
packet_wait(channel->session, 0, 0);
if (packet_wait(channel->session, 0, 0) == SSH_ERROR) {
goto error;
}
}
effectivelen = len > channel->remote_window ? channel->remote_window : len;
} else {