summaryrefslogtreecommitdiff
path: root/nchan.c
diff options
context:
space:
mode:
Diffstat (limited to 'nchan.c')
-rw-r--r--nchan.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/nchan.c b/nchan.c
index e0ebf43f1..160445e5a 100644
--- a/nchan.c
+++ b/nchan.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: nchan.c,v 1.60 2008/06/30 12:16:02 djm Exp $ */ 1/* $OpenBSD: nchan.c,v 1.62 2008/11/07 18:50:18 stevesk 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 *
@@ -387,6 +387,8 @@ chan_send_eow2(Channel *c)
387 c->self); 387 c->self);
388 return; 388 return;
389 } 389 }
390 if (!(datafellows & SSH_NEW_OPENSSH))
391 return;
390 packet_start(SSH2_MSG_CHANNEL_REQUEST); 392 packet_start(SSH2_MSG_CHANNEL_REQUEST);
391 packet_put_int(c->remote_id); 393 packet_put_int(c->remote_id);
392 packet_put_cstring("eow@openssh.com"); 394 packet_put_cstring("eow@openssh.com");
@@ -484,12 +486,12 @@ chan_shutdown_write(Channel *c)
484 if (c->sock != -1) { 486 if (c->sock != -1) {
485 if (shutdown(c->sock, SHUT_WR) < 0) 487 if (shutdown(c->sock, SHUT_WR) < 0)
486 debug2("channel %d: chan_shutdown_write: " 488 debug2("channel %d: chan_shutdown_write: "
487 "shutdown() failed for fd%d: %.100s", 489 "shutdown() failed for fd %d: %.100s",
488 c->self, c->sock, strerror(errno)); 490 c->self, c->sock, strerror(errno));
489 } else { 491 } else {
490 if (channel_close_fd(&c->wfd) < 0) 492 if (channel_close_fd(&c->wfd) < 0)
491 logit("channel %d: chan_shutdown_write: " 493 logit("channel %d: chan_shutdown_write: "
492 "close() failed for fd%d: %.100s", 494 "close() failed for fd %d: %.100s",
493 c->self, c->wfd, strerror(errno)); 495 c->self, c->wfd, strerror(errno));
494 } 496 }
495} 497}
@@ -508,13 +510,13 @@ chan_shutdown_read(Channel *c)
508 if (shutdown(c->sock, SHUT_RD) < 0 510 if (shutdown(c->sock, SHUT_RD) < 0
509 && errno != ENOTCONN) 511 && errno != ENOTCONN)
510 error("channel %d: chan_shutdown_read: " 512 error("channel %d: chan_shutdown_read: "
511 "shutdown() failed for fd%d [i%d o%d]: %.100s", 513 "shutdown() failed for fd %d [i%d o%d]: %.100s",
512 c->self, c->sock, c->istate, c->ostate, 514 c->self, c->sock, c->istate, c->ostate,
513 strerror(errno)); 515 strerror(errno));
514 } else { 516 } else {
515 if (channel_close_fd(&c->rfd) < 0) 517 if (channel_close_fd(&c->rfd) < 0)
516 logit("channel %d: chan_shutdown_read: " 518 logit("channel %d: chan_shutdown_read: "
517 "close() failed for fd%d: %.100s", 519 "close() failed for fd %d: %.100s",
518 c->self, c->rfd, strerror(errno)); 520 c->self, c->rfd, strerror(errno));
519 } 521 }
520} 522}