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
Этот коммит содержится в:
родитель
848984f25f
Коммит
d14a492019
@ -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 {
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user