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 | e6a9ce5c55e7ec72dc4636135b5c6f9f49cafdda (patch) | |
tree | d753becf83fa3e5cb8a05b681b9ca1f3ee014ab1 /common-channel.c | |
parent | 1d23c9f31363ac8195733e40d45e4b7fa78140c3 (diff) | |
download | dropbear-e6a9ce5c55e7ec72dc4636135b5c6f9f49cafdda.tar.gz |
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); |