summaryrefslogtreecommitdiff
path: root/channels.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels.c')
-rw-r--r--channels.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/channels.c b/channels.c
index c5ec1fc87..3e3b5f369 100644
--- a/channels.c
+++ b/channels.c
@@ -16,7 +16,7 @@ arbitrary tcp/ip connections, and the authentication agent connection.
16*/ 16*/
17 17
18#include "includes.h" 18#include "includes.h"
19RCSID("$Id: channels.c,v 1.5 1999/11/12 04:19:27 damien Exp $"); 19RCSID("$Id: channels.c,v 1.6 1999/11/21 02:23:53 damien Exp $");
20 20
21#include "ssh.h" 21#include "ssh.h"
22#include "packet.h" 22#include "packet.h"
@@ -208,7 +208,7 @@ void channel_prepare_select(fd_set *readset, fd_set *writeset)
208 208
209 case SSH_CHANNEL_OPEN: 209 case SSH_CHANNEL_OPEN:
210 if(compat13){ 210 if(compat13){
211 if (buffer_len(&ch->input) < 32768) 211 if (buffer_len(&ch->input) < packet_get_maxsize())
212 FD_SET(ch->sock, readset); 212 FD_SET(ch->sock, readset);
213 if (buffer_len(&ch->output) > 0) 213 if (buffer_len(&ch->output) > 0)
214 FD_SET(ch->sock, writeset); 214 FD_SET(ch->sock, writeset);
@@ -216,7 +216,7 @@ void channel_prepare_select(fd_set *readset, fd_set *writeset)
216 } 216 }
217 /* test whether sockets are 'alive' for read/write */ 217 /* test whether sockets are 'alive' for read/write */
218 if (ch->istate == CHAN_INPUT_OPEN) 218 if (ch->istate == CHAN_INPUT_OPEN)
219 if (buffer_len(&ch->input) < 32768) 219 if (buffer_len(&ch->input) < packet_get_maxsize())
220 FD_SET(ch->sock, readset); 220 FD_SET(ch->sock, readset);
221 if (ch->ostate == CHAN_OUTPUT_OPEN || ch->ostate == CHAN_OUTPUT_WAIT_DRAIN){ 221 if (ch->ostate == CHAN_OUTPUT_OPEN || ch->ostate == CHAN_OUTPUT_WAIT_DRAIN){
222 if (buffer_len(&ch->output) > 0){ 222 if (buffer_len(&ch->output) > 0){
@@ -611,9 +611,9 @@ int channel_not_very_much_buffered_data()
611 case SSH_CHANNEL_AUTH_SOCKET: 611 case SSH_CHANNEL_AUTH_SOCKET:
612 continue; 612 continue;
613 case SSH_CHANNEL_OPEN: 613 case SSH_CHANNEL_OPEN:
614 if (buffer_len(&ch->input) > 32768) 614 if (buffer_len(&ch->input) > packet_get_maxsize())
615 return 0; 615 return 0;
616 if (buffer_len(&ch->output) > 32768) 616 if (buffer_len(&ch->output) > packet_get_maxsize())
617 return 0; 617 return 0;
618 continue; 618 continue;
619 case SSH_CHANNEL_INPUT_DRAINING: 619 case SSH_CHANNEL_INPUT_DRAINING: