diff options
Diffstat (limited to 'channels.c')
-rw-r--r-- | channels.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/channels.c b/channels.c index a84b487e5..c9d2015ee 100644 --- a/channels.c +++ b/channels.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: channels.c,v 1.347 2015/07/01 02:26:31 djm Exp $ */ | 1 | /* $OpenBSD: channels.c,v 1.349 2016/02/05 13:28:19 naddy 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 |
@@ -662,7 +662,7 @@ channel_open_message(void) | |||
662 | case SSH_CHANNEL_INPUT_DRAINING: | 662 | case SSH_CHANNEL_INPUT_DRAINING: |
663 | case SSH_CHANNEL_OUTPUT_DRAINING: | 663 | case SSH_CHANNEL_OUTPUT_DRAINING: |
664 | snprintf(buf, sizeof buf, | 664 | snprintf(buf, sizeof buf, |
665 | " #%d %.300s (t%d r%d i%d/%d o%d/%d fd %d/%d cc %d)\r\n", | 665 | " #%d %.300s (t%d r%d i%u/%d o%u/%d fd %d/%d cc %d)\r\n", |
666 | c->self, c->remote_name, | 666 | c->self, c->remote_name, |
667 | c->type, c->remote_id, | 667 | c->type, c->remote_id, |
668 | c->istate, buffer_len(&c->input), | 668 | c->istate, buffer_len(&c->input), |
@@ -1896,13 +1896,13 @@ read_mux(Channel *c, u_int need) | |||
1896 | if (buffer_len(&c->input) < need) { | 1896 | if (buffer_len(&c->input) < need) { |
1897 | rlen = need - buffer_len(&c->input); | 1897 | rlen = need - buffer_len(&c->input); |
1898 | len = read(c->rfd, buf, MIN(rlen, CHAN_RBUF)); | 1898 | len = read(c->rfd, buf, MIN(rlen, CHAN_RBUF)); |
1899 | if (len < 0 && (errno == EINTR || errno == EAGAIN)) | ||
1900 | return buffer_len(&c->input); | ||
1899 | if (len <= 0) { | 1901 | if (len <= 0) { |
1900 | if (errno != EINTR && errno != EAGAIN) { | 1902 | debug2("channel %d: ctl read<=0 rfd %d len %d", |
1901 | debug2("channel %d: ctl read<=0 rfd %d len %d", | 1903 | c->self, c->rfd, len); |
1902 | c->self, c->rfd, len); | 1904 | chan_read_failed(c); |
1903 | chan_read_failed(c); | 1905 | return 0; |
1904 | return 0; | ||
1905 | } | ||
1906 | } else | 1906 | } else |
1907 | buffer_append(&c->input, buf, len); | 1907 | buffer_append(&c->input, buf, len); |
1908 | } | 1908 | } |