summaryrefslogtreecommitdiff
path: root/channels.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels.c')
-rw-r--r--channels.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/channels.c b/channels.c
index 1e57951dc..99b23d75f 100644
--- a/channels.c
+++ b/channels.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: channels.c,v 1.276 2008/05/09 04:55:56 djm Exp $ */ 1/* $OpenBSD: channels.c,v 1.277 2008/05/09 16:17:51 markus Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -819,7 +819,8 @@ channel_pre_open(Channel *c, fd_set *readset, fd_set *writeset)
819 } 819 }
820 } 820 }
821 /** XXX check close conditions, too */ 821 /** XXX check close conditions, too */
822 if (compat20 && c->efd != -1) { 822 if (compat20 && c->efd != -1 &&
823 !(c->istate == CHAN_INPUT_CLOSED && c->ostate == CHAN_OUTPUT_CLOSED)) {
823 if (c->extended_usage == CHAN_EXTENDED_WRITE && 824 if (c->extended_usage == CHAN_EXTENDED_WRITE &&
824 buffer_len(&c->extended) > 0) 825 buffer_len(&c->extended) > 0)
825 FD_SET(c->efd, writeset); 826 FD_SET(c->efd, writeset);