diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2011-09-14 22:35:12 +0200 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2011-09-14 22:35:12 +0200 |
commit | 36ec488663e280deed50103534d71b698f3023c6 (patch) | |
tree | 15177e8abcc8c80e9d390f224c012d8a773d6b50 | |
parent | 714aeca91f209bf5cc9cdaa6f754a94a00343a36 (diff) | |
download | libssh-36ec488663e280deed50103534d71b698f3023c6.tar.gz libssh-36ec488663e280deed50103534d71b698f3023c6.tar.xz libssh-36ec488663e280deed50103534d71b698f3023c6.zip |
channels: don't send SSH2 packets on SSH1 !
-rw-r--r-- | src/channels.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/channels.c b/src/channels.c index 94010a24..39f29c45 100644 --- a/src/channels.c +++ b/src/channels.c @@ -351,6 +351,13 @@ static int grow_window(ssh_session session, ssh_channel channel, int minimumsize uint32_t new_window = minimumsize > WINDOWBASE ? minimumsize : WINDOWBASE; 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){ ssh_log(session,SSH_LOG_PROTOCOL, "growing window (channel %d:%d) to %d bytes : not needed (%d bytes)", |