summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Steves <stevesk@pobox.com>2001-04-04 15:00:19 +0000
committerKevin Steves <stevesk@pobox.com>2001-04-04 15:00:19 +0000
commitd6b07d849a7003aefaec0b90a8556c53fff7a077 (patch)
tree8c082c941e0603dbc9e47f314138cc44c91424aa
parent7f64c3ae26e8c4c7b7956436d41b1dea1c79bb2e (diff)
- (stevesk) nchan.c: remove ostate checks and add EINVAL to
shutdown(SHUT_RD) error() bypass for HP-UX.
-rw-r--r--ChangeLog6
-rw-r--r--nchan.c5
2 files changed, 7 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index d4535c86..935e4970 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+20010404
+ - (stevesk) nchan.c: remove ostate checks and add EINVAL to
+ shutdown(SHUT_RD) error() bypass for HP-UX.
+
20010330
- (djm) Another openbsd-compat/glob.c sync
- (djm) Document default protocol order in config files
@@ -4696,4 +4700,4 @@
- Wrote replacements for strlcpy and mkdtemp
- Released 1.0pre1
-$Id: ChangeLog,v 1.991.2.18 2001/03/30 01:01:42 djm Exp $
+$Id: ChangeLog,v 1.991.2.19 2001/04/04 15:00:19 stevesk Exp $
diff --git a/nchan.c b/nchan.c
index d91217e5..77e4ef48 100644
--- a/nchan.c
+++ b/nchan.c
@@ -489,11 +489,10 @@ chan_shutdown_read(Channel *c)
/*
* shutdown(sock, SHUT_READ) may return ENOTCONN if the
* write side has been closed already. (bug on Linux)
+ * HP-UX will return EINVAL.
*/
if (shutdown(c->sock, SHUT_RD) < 0
- && (errno != ENOTCONN
- || c->ostate == CHAN_OUTPUT_OPEN
- || c->ostate == CHAN_OUTPUT_WAIT_DRAIN))
+ && (errno != ENOTCONN && errno != EINVAL))
error("channel %d: chan_shutdown_read: shutdown() failed for fd%d [i%d o%d]: %.100s",
c->self, c->sock, c->istate, c->ostate, strerror(errno));
} else {