summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2002-07-22 15:28:53 +0000
committerBen Lindstrom <mouring@eviladmin.org>2002-07-22 15:28:53 +0000
commitbeb5f3304b74fe04a1fde815fe70ecf2f30e95b1 (patch)
treee0b47b7561930363b8f72f96a1fe3e07308e8f5a
parent287077eaf2db7115a08f0fa9bd811ddda6119209 (diff)
- (bal) AIX tty data limiting patch fix by leigh@solinno.co.uk
-rw-r--r--ChangeLog5
-rw-r--r--channels.c5
-rw-r--r--channels.h1
3 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index cfe70b218..432d7a813 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
120020722
2 - (bal) AIX tty data limiting patch fix by leigh@solinno.co.uk
3
120020721 420020721
2 - (stevesk) [auth-pam.c] merge cosmetic changes from solar's 5 - (stevesk) [auth-pam.c] merge cosmetic changes from solar's
3 openssh-3.4p1-owl-password-changing.diff 6 openssh-3.4p1-owl-password-changing.diff
@@ -1408,4 +1411,4 @@
1408 - (stevesk) entropy.c: typo in debug message 1411 - (stevesk) entropy.c: typo in debug message
1409 - (djm) ssh-keygen -i needs seeded RNG; report from markus@ 1412 - (djm) ssh-keygen -i needs seeded RNG; report from markus@
1410 1413
1411$Id: ChangeLog,v 1.2386 2002/07/21 23:59:40 stevesk Exp $ 1414$Id: ChangeLog,v 1.2387 2002/07/22 15:28:53 mouring Exp $
diff --git a/channels.c b/channels.c
index cf6742ae3..fe99cdbec 100644
--- a/channels.c
+++ b/channels.c
@@ -186,6 +186,7 @@ channel_register_fds(Channel *c, int rfd, int wfd, int efd,
186 } else { 186 } else {
187 c->isatty = 0; 187 c->isatty = 0;
188 } 188 }
189 c->wfd_isatty = isatty(c->wfd);
189 190
190 /* enable nonblocking mode */ 191 /* enable nonblocking mode */
191 if (nonblock) { 192 if (nonblock) {
@@ -1286,12 +1287,12 @@ channel_handle_wfd(Channel *c, fd_set * readset, fd_set * writeset)
1286 buffer_len(&c->output) > 0) { 1287 buffer_len(&c->output) > 0) {
1287 data = buffer_ptr(&c->output); 1288 data = buffer_ptr(&c->output);
1288 dlen = buffer_len(&c->output); 1289 dlen = buffer_len(&c->output);
1289 len = write(c->wfd, data, dlen);
1290#ifdef _AIX 1290#ifdef _AIX
1291 /* XXX: Later AIX versions can't push as much data to tty */ 1291 /* XXX: Later AIX versions can't push as much data to tty */
1292 if (compat20 && c->isatty && dlen >= 8*1024) 1292 if (compat20 && c->wfd_isatty && dlen > 8*1024)
1293 dlen = 8*1024; 1293 dlen = 8*1024;
1294#endif 1294#endif
1295 len = write(c->wfd, data, dlen);
1295 if (len < 0 && (errno == EINTR || errno == EAGAIN)) 1296 if (len < 0 && (errno == EINTR || errno == EAGAIN))
1296 return 1; 1297 return 1;
1297 if (len <= 0) { 1298 if (len <= 0) {
diff --git a/channels.h b/channels.h
index dd54114d6..bd2e92589 100644
--- a/channels.h
+++ b/channels.h
@@ -77,6 +77,7 @@ struct Channel {
77 int efd; /* extended fd */ 77 int efd; /* extended fd */
78 int sock; /* sock fd */ 78 int sock; /* sock fd */
79 int isatty; /* rfd is a tty */ 79 int isatty; /* rfd is a tty */
80 int wfd_isatty; /* wfd is a tty */
80 int force_drain; /* force close on iEOF */ 81 int force_drain; /* force close on iEOF */
81 int delayed; /* fdset hack */ 82 int delayed; /* fdset hack */
82 Buffer input; /* data read from socket, to be sent over 83 Buffer input; /* data read from socket, to be sent over