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

channels: don't send SSH2 packets on SSH1 !

This commit is contained in:
Aris Adamantiadis
2011-09-14 22:35:12 +02:00
parent 714aeca91f
commit 36ec488663

View File

@@ -351,6 +351,13 @@ static int grow_window(ssh_session session, ssh_channel channel, int minimumsize
uint32_t new_window = minimumsize > WINDOWBASE ? minimumsize : WINDOWBASE; uint32_t new_window = minimumsize > WINDOWBASE ? minimumsize : WINDOWBASE;
enter_function(); enter_function();
#ifdef WITH_SSH1
if (session->version == 1){
channel->remote_window = new_window;
leave_function();
return SSH_OK;
}
#endif
if(new_window <= channel->local_window){ if(new_window <= channel->local_window){
ssh_log(session,SSH_LOG_PROTOCOL, ssh_log(session,SSH_LOG_PROTOCOL,
"growing window (channel %d:%d) to %d bytes : not needed (%d bytes)", "growing window (channel %d:%d) to %d bytes : not needed (%d bytes)",