]> andersk Git - openssh.git/commitdiff
- (bal) AIX tty data limiting patch fix by leigh@solinno.co.uk
authormouring <mouring>
Mon, 22 Jul 2002 15:28:53 +0000 (15:28 +0000)
committermouring <mouring>
Mon, 22 Jul 2002 15:28:53 +0000 (15:28 +0000)
ChangeLog
channels.c
channels.h

index 0fabd7a5008a8e0ce6dea44e3db71990df10a1cf..71056382319b57ecce718ef73173369f7794d7b8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+20020722
+ - (bal) AIX tty data limiting patch fix by leigh@solinno.co.uk
+
 20020721
  - (stevesk) [auth-pam.c] merge cosmetic changes from solar's
    openssh-3.4p1-owl-password-changing.diff
index cf6742ae35a7dee780e0cfc1daadc371b6af1338..fe99cdbecd348b2668fc7bd829b9cd72c0c30b83 100644 (file)
@@ -186,6 +186,7 @@ channel_register_fds(Channel *c, int rfd, int wfd, int efd,
        } else {
                c->isatty = 0;
        }
+       c->wfd_isatty = isatty(c->wfd);
 
        /* enable nonblocking mode */
        if (nonblock) {
@@ -1286,12 +1287,12 @@ channel_handle_wfd(Channel *c, fd_set * readset, fd_set * writeset)
            buffer_len(&c->output) > 0) {
                data = buffer_ptr(&c->output);
                dlen = buffer_len(&c->output);
-               len = write(c->wfd, data, dlen);
 #ifdef _AIX
                /* XXX: Later AIX versions can't push as much data to tty */ 
-               if (compat20 && c->isatty && dlen >= 8*1024)
+               if (compat20 && c->wfd_isatty && dlen > 8*1024)
                        dlen = 8*1024;
 #endif
+               len = write(c->wfd, data, dlen);
                if (len < 0 && (errno == EINTR || errno == EAGAIN))
                        return 1;
                if (len <= 0) {
index dd54114d6c013d0840c274fc09a5b0b761592c0d..bd2e92589c591648f8811a1174245783f0a04288 100644 (file)
@@ -77,6 +77,7 @@ struct Channel {
        int     efd;            /* extended fd */
        int     sock;           /* sock fd */
        int     isatty;         /* rfd is a tty */
+       int     wfd_isatty;     /* wfd is a tty */
        int     force_drain;    /* force close on iEOF */
        int     delayed;                /* fdset hack */
        Buffer  input;          /* data read from socket, to be sent over
This page took 0.256726 seconds and 5 git commands to generate.