summaryrefslogtreecommitdiff
path: root/nchan.c
diff options
context:
space:
mode:
Diffstat (limited to 'nchan.c')
-rw-r--r--nchan.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/nchan.c b/nchan.c
index 8294d7fca..1e96eb641 100644
--- a/nchan.c
+++ b/nchan.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: nchan.c,v 1.69 2018/10/04 07:47:35 djm Exp $ */ 1/* $OpenBSD: nchan.c,v 1.70 2019/06/28 13:35:04 deraadt Exp $ */
2/* 2/*
3 * Copyright (c) 1999, 2000, 2001, 2002 Markus Friedl. All rights reserved. 3 * Copyright (c) 1999, 2000, 2001, 2002 Markus Friedl. All rights reserved.
4 * 4 *
@@ -380,7 +380,7 @@ chan_shutdown_write(struct ssh *ssh, Channel *c)
380 c->self, __func__, c->istate, c->ostate, c->sock, c->wfd, c->efd, 380 c->self, __func__, c->istate, c->ostate, c->sock, c->wfd, c->efd,
381 channel_format_extended_usage(c)); 381 channel_format_extended_usage(c));
382 if (c->sock != -1) { 382 if (c->sock != -1) {
383 if (shutdown(c->sock, SHUT_WR) < 0) { 383 if (shutdown(c->sock, SHUT_WR) == -1) {
384 debug2("channel %d: %s: shutdown() failed for " 384 debug2("channel %d: %s: shutdown() failed for "
385 "fd %d [i%d o%d]: %.100s", c->self, __func__, 385 "fd %d [i%d o%d]: %.100s", c->self, __func__,
386 c->sock, c->istate, c->ostate, 386 c->sock, c->istate, c->ostate,
@@ -410,7 +410,7 @@ chan_shutdown_read(struct ssh *ssh, Channel *c)
410 * write side has been closed already. (bug on Linux) 410 * write side has been closed already. (bug on Linux)
411 * HP-UX may return ENOTCONN also. 411 * HP-UX may return ENOTCONN also.
412 */ 412 */
413 if (shutdown(c->sock, SHUT_RD) < 0 && errno != ENOTCONN) { 413 if (shutdown(c->sock, SHUT_RD) == -1 && errno != ENOTCONN) {
414 error("channel %d: %s: shutdown() failed for " 414 error("channel %d: %s: shutdown() failed for "
415 "fd %d [i%d o%d]: %.100s", 415 "fd %d [i%d o%d]: %.100s",
416 c->self, __func__, c->sock, c->istate, c->ostate, 416 c->self, __func__, c->sock, c->istate, c->ostate,