Print this page
8527 tty buffer/queue sizes should be larger

@@ -564,12 +564,12 @@
  */
 static struct module_info ldtermmiinfo = {
         0x0bad,
         "ldterm",
         0,
-        256,
-        HIWAT,
+        _TTY_BUFSIZ,
+        _TTY_BUFSIZ,
         LOWAT
 };
 
 
 static struct qinit ldtermrinit = {

@@ -791,11 +791,11 @@
         if ((bp = open_mblk(q, sizeof (struct stroptions))) == NULL)
                 goto open_abort;
         strop = (struct stroptions *)bp->b_wptr;
         strop->so_flags = SO_READOPT|SO_HIWAT|SO_LOWAT|SO_NDELON|SO_ISTTY;
         strop->so_readopt = RMSGN;
-        strop->so_hiwat = HIWAT;
+        strop->so_hiwat = _TTY_BUFSIZ;
         strop->so_lowat = LOWAT;
         bp->b_wptr += sizeof (struct stroptions);
         bp->b_datap->db_type = M_SETOPTS;
         putnext(q, bp);
 

@@ -1893,11 +1893,11 @@
          * tp->t_maxeuc from MAX_CANON before checking.
          *
          * Allows MAX_CANON bytes in the buffer before throwing awaying
          * the the overflow of characters.
          */
-        if ((tp->t_msglen > ((MAX_CANON + 1) - (int)tp->t_maxeuc)) &&
+        if ((tp->t_msglen > ((_TTY_BUFSIZ + 1) - (int)tp->t_maxeuc)) &&
             !((tp->t_state & TS_MEUC) && tp->t_eucleft)) {
 
                 /*
                  * Byte will cause line to overflow, or the next EUC
                  * won't fit: Ring the bell or discard all input, and

@@ -4381,12 +4381,12 @@
                                 if (tp->eucwioc.scrw[i] > 1)
                                         tp->t_state |= TS_MEUC;
                         }
                         if ((tp->t_maxeuc > 1) || (tp->t_state & TS_MEUC)) {
                                 if (!tp->t_eucp_mp) {
-                                        if (!(tp->t_eucp_mp = allocb(CANBSIZ,
-                                            BPRI_HI))) {
+                                        if ((tp->t_eucp_mp = allocb(_TTY_BUFSIZ,
+                                            BPRI_HI)) == NULL) {
                                                 tp->t_maxeuc = 1;
                                                 tp->t_state &= ~TS_MEUC;
                                                 cmn_err(CE_WARN,
                                                     "Can't allocate eucp_mp");
                                                 miocnak(q, mp, 0, ENOSR);

@@ -4610,11 +4610,11 @@
                 /* Do the switching. */
                 tp->t_maxeuc = maxbytelen;
                 tp->t_state &= ~TS_MEUC;
                 if (maxbytelen > 1 || maxscreenlen > 1) {
                         if (!tp->t_eucp_mp) {
-                                if (!(tp->t_eucp_mp = allocb(CANBSIZ,
+                                if (!(tp->t_eucp_mp = allocb(_TTY_BUFSIZ,
                                     BPRI_HI))) {
                                         cmn_err(CE_WARN,
                                             "Can't allocate eucp_mp");
                                         miocnak(q, mp, 0, ENOSR);
                                         return;