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:
@@ -904,7 +904,9 @@ int channel_write(CHANNEL *channel, const void *data, u32 len) {
|
|||||||
/* What happens when the channel window is zero? */
|
/* What happens when the channel window is zero? */
|
||||||
while(channel->remote_window == 0) {
|
while(channel->remote_window == 0) {
|
||||||
/* parse every incoming packet */
|
/* 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;
|
effectivelen = len > channel->remote_window ? channel->remote_window : len;
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user