diff options
author | Matt Johnston <matt@ucc.asn.au> | 2015-03-20 23:36:42 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2015-03-20 23:36:42 +0800 |
commit | 275611fbaaa14824de69bccc68161d5ed195b745 (patch) | |
tree | a41f254aa307fb360efe3a1fe5699a62a35ebbf2 /common-channel.c | |
parent | a070159cc5ed59df4d79f6d23c9ba87a3f50a7ec (diff) |
Make main socket nonblocking. Limit writequeue size.
Diffstat (limited to 'common-channel.c')
-rw-r--r-- | common-channel.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common-channel.c b/common-channel.c index a2ed283..0e5c0f1 100644 --- a/common-channel.c +++ b/common-channel.c @@ -531,7 +531,7 @@ static void writechannel(struct Channel* channel, int fd, circbuffer *cbuf, /* Set the file descriptors for the main select in session.c * This avoid channels which don't have any window available, are closed, etc*/ -void setchannelfds(fd_set *readfds, fd_set *writefds) { +void setchannelfds(fd_set *readfds, fd_set *writefds, int allow_reads) { unsigned int i; struct Channel * channel; @@ -549,7 +549,7 @@ void setchannelfds(fd_set *readfds, fd_set *writefds) { FD if there's the possibility of "~."" to kill an interactive session (the read_mangler) */ if (channel->transwindow > 0 - && (ses.dataallowed || channel->read_mangler)) { + && ((ses.dataallowed && allow_reads) || channel->read_mangler)) { if (channel->readfd >= 0) { FD_SET(channel->readfd, readfds); |