summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2011-09-14 22:35:12 +0200
committerAris Adamantiadis <aris@0xbadc0de.be>2011-09-15 11:25:00 +0200
commit9180bfffcd3987a1d2429bc081a08d827aa8a8e1 (patch)
treea61e7d65b779057d9efa18437bd767d1de4b9f90
parent058bb0f4ea24a23ae47f7bbe607c2efd446005d1 (diff)
downloadlibssh-9180bfffcd3987a1d2429bc081a08d827aa8a8e1.tar.gz
libssh-9180bfffcd3987a1d2429bc081a08d827aa8a8e1.tar.xz
libssh-9180bfffcd3987a1d2429bc081a08d827aa8a8e1.zip
channels: don't send SSH2 packets on SSH1 !
-rw-r--r--src/channels.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/channels.c b/src/channels.c
index c3d847ab..bb1ceeda 100644
--- a/src/channels.c
+++ b/src/channels.c
@@ -331,6 +331,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)",