1
1
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@675 7dcaeef0-15fb-0310-b436-a5af3365683c
Этот коммит содержится в:
Andreas Schneider 2009-05-02 20:47:19 +00:00
родитель 0534fee674
Коммит 6538121494

Просмотреть файл

@ -255,13 +255,9 @@ static int grow_window(SSH_SESSION *session, CHANNEL *channel, int minimumsize)
enter_function();
if (buffer_add_u8(session->out_buffer,SSH2_MSG_CHANNEL_WINDOW_ADJUST) < 0) {
goto error;
}
if (buffer_add_u32(session->out_buffer,htonl(channel->remote_channel)) < 0) {
goto error;
}
if (buffer_add_u32(session->out_buffer,htonl(new_window)) < 0) {
if (buffer_add_u8(session->out_buffer, SSH2_MSG_CHANNEL_WINDOW_ADJUST) < 0 ||
buffer_add_u32(session->out_buffer, htonl(channel->remote_channel)) < 0 ||
buffer_add_u32(session->out_buffer, htonl(new_window)) < 0) {
goto error;
}
@ -270,14 +266,16 @@ static int grow_window(SSH_SESSION *session, CHANNEL *channel, int minimumsize)
leave_function();
return 1;
}
ssh_log(session, SSH_LOG_PROTOCOL,
"growing window (channel %d:%d) to %d bytes",
channel->local_channel,
channel->remote_channel,
channel->local_window + new_window);
channel->local_window+=new_window;
leave_function();
channel->local_window += new_window;
leave_function();
return 0;
error:
buffer_free(session->out_buffer);