From 512c9ac6313d2a2172829275c99ef97384f28a22 Mon Sep 17 00:00:00 2001 From: Markus Friedl Date: Fri, 19 Nov 1999 16:32:02 +0000 Subject: SSH_CMSG_MAX_PACKET_SIZE, some clients use this, some need this, niels@ --- usr.bin/ssh/channels.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'usr.bin/ssh') diff --git a/usr.bin/ssh/channels.c b/usr.bin/ssh/channels.c index a4af21cc150..d695f2b5392 100644 --- a/usr.bin/ssh/channels.c +++ b/usr.bin/ssh/channels.c @@ -16,7 +16,7 @@ arbitrary tcp/ip connections, and the authentication agent connection. */ #include "includes.h" -RCSID("$Id: channels.c,v 1.20 1999/11/11 23:36:52 markus Exp $"); +RCSID("$Id: channels.c,v 1.21 1999/11/19 16:32:01 markus Exp $"); #include "ssh.h" #include "packet.h" @@ -208,7 +208,7 @@ void channel_prepare_select(fd_set *readset, fd_set *writeset) case SSH_CHANNEL_OPEN: if(compat13){ - if (buffer_len(&ch->input) < 32768) + if (buffer_len(&ch->input) < packet_get_maxsize()) FD_SET(ch->sock, readset); if (buffer_len(&ch->output) > 0) FD_SET(ch->sock, writeset); @@ -216,7 +216,7 @@ void channel_prepare_select(fd_set *readset, fd_set *writeset) } /* test whether sockets are 'alive' for read/write */ if (ch->istate == CHAN_INPUT_OPEN) - if (buffer_len(&ch->input) < 32768) + if (buffer_len(&ch->input) < packet_get_maxsize()) FD_SET(ch->sock, readset); if (ch->ostate == CHAN_OUTPUT_OPEN || ch->ostate == CHAN_OUTPUT_WAIT_DRAIN){ if (buffer_len(&ch->output) > 0){ @@ -611,9 +611,9 @@ int channel_not_very_much_buffered_data() case SSH_CHANNEL_AUTH_SOCKET: continue; case SSH_CHANNEL_OPEN: - if (buffer_len(&ch->input) > 32768) + if (buffer_len(&ch->input) > packet_get_maxsize()) return 0; - if (buffer_len(&ch->output) > 32768) + if (buffer_len(&ch->output) > packet_get_maxsize()) return 0; continue; case SSH_CHANNEL_INPUT_DRAINING: -- cgit v1.2.3