diff options
author | Colin Watson <cjwatson@debian.org> | 2019-10-09 22:59:48 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2019-10-09 22:59:48 +0100 |
commit | 4213eec74e74de6310c27a40c3e9759a08a73996 (patch) | |
tree | e97a6dcafc6763aea7c804e4e113c2750cb1400d /nchan.c | |
parent | 102062f825fb26a74295a1c089c00c4c4c76b68a (diff) | |
parent | cdf1d0a9f5d18535e0a18ff34860e81a6d83aa5c (diff) |
Import openssh_8.1p1.orig.tar.gz
Diffstat (limited to 'nchan.c')
-rw-r--r-- | nchan.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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, |