summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorgreen <green@FreeBSD.org>2001-06-26 14:17:35 +0000
committergreen <green@FreeBSD.org>2001-06-26 14:17:35 +0000
commitc3258d9fddeaad0e7b0be93639ee22c6b1a82650 (patch)
treeedad20a8621a240c50612e03409951bd7ba4456d /crypto
parent5f33e80da4df5c91c11b37c3e31834f49b2d532d (diff)
downloadFreeBSD-src-c3258d9fddeaad0e7b0be93639ee22c6b1a82650.zip
FreeBSD-src-c3258d9fddeaad0e7b0be93639ee22c6b1a82650.tar.gz
Don't pointlessly kill a channel because the first (forced)
non-blocking read returns 0. Now I can finally tunnel CVSUP again...
Diffstat (limited to 'crypto')
-rw-r--r--crypto/openssh/channels.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/openssh/channels.c b/crypto/openssh/channels.c
index 38bec00..047cd5a 100644
--- a/crypto/openssh/channels.c
+++ b/crypto/openssh/channels.c
@@ -871,8 +871,10 @@ channel_handle_rfd(Channel *c, fd_set * readset, fd_set * writeset)
len = read(c->rfd, buf, sizeof(buf));
if (len < 0 && (errno == EINTR || errno == EAGAIN))
return 1;
- if (len <= 0) {
- debug("channel %d: read<=0 rfd %d len %d",
+ if (len == 0)
+ return 1;
+ if (len < 0) {
+ debug("channel %d: read<0 rfd %d len %d",
c->self, c->rfd, len);
if (c->type != SSH_CHANNEL_OPEN) {
debug("channel %d: not open", c->self);
OpenPOWER on IntegriCloud