[BACK]Return to ttymodes.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/ttymodes.c between version 1.13 and 1.13.2.2

version 1.13, 2001/04/15 01:35:22 version 1.13.2.2, 2002/03/09 00:20:45
Line 275 
Line 275 
   
         /* Store input and output baud rates. */          /* Store input and output baud rates. */
         baud = speed_to_baud(cfgetospeed(&tio));          baud = speed_to_baud(cfgetospeed(&tio));
         debug2("tty_make_modes: ospeed %d", baud);          debug3("tty_make_modes: ospeed %d", baud);
         buffer_put_char(&buf, tty_op_ospeed);          buffer_put_char(&buf, tty_op_ospeed);
         buffer_put_int(&buf, baud);          buffer_put_int(&buf, baud);
         baud = speed_to_baud(cfgetispeed(&tio));          baud = speed_to_baud(cfgetispeed(&tio));
         debug2("tty_make_modes: ispeed %d", baud);          debug3("tty_make_modes: ispeed %d", baud);
         buffer_put_char(&buf, tty_op_ispeed);          buffer_put_char(&buf, tty_op_ispeed);
         buffer_put_int(&buf, baud);          buffer_put_int(&buf, baud);
   
         /* Store values of mode flags. */          /* Store values of mode flags. */
 #define TTYCHAR(NAME, OP) \  #define TTYCHAR(NAME, OP) \
         debug2("tty_make_modes: %d %d", OP, tio.c_cc[NAME]); \          debug3("tty_make_modes: %d %d", OP, tio.c_cc[NAME]); \
         buffer_put_char(&buf, OP); \          buffer_put_char(&buf, OP); \
         put_arg(&buf, tio.c_cc[NAME]);          put_arg(&buf, tio.c_cc[NAME]);
   
 #define TTYMODE(NAME, FIELD, OP) \  #define TTYMODE(NAME, FIELD, OP) \
         debug2("tty_make_modes: %d %d", OP, ((tio.FIELD & NAME) != 0)); \          debug3("tty_make_modes: %d %d", OP, ((tio.FIELD & NAME) != 0)); \
         buffer_put_char(&buf, OP); \          buffer_put_char(&buf, OP); \
         put_arg(&buf, ((tio.FIELD & NAME) != 0));          put_arg(&buf, ((tio.FIELD & NAME) != 0));
   
Line 326 
Line 326 
   
         if (compat20) {          if (compat20) {
                 *n_bytes_ptr = packet_get_int();                  *n_bytes_ptr = packet_get_int();
                 debug2("tty_parse_modes: SSH2 n_bytes %d", *n_bytes_ptr);                  debug3("tty_parse_modes: SSH2 n_bytes %d", *n_bytes_ptr);
                 if (*n_bytes_ptr == 0)                  if (*n_bytes_ptr == 0)
                         return;                          return;
                 get_arg = packet_get_int;                  get_arg = packet_get_int;
Line 358 
Line 358 
                 case TTY_OP_ISPEED_PROTO2:                  case TTY_OP_ISPEED_PROTO2:
                         n_bytes += 4;                          n_bytes += 4;
                         baud = packet_get_int();                          baud = packet_get_int();
                         debug2("tty_parse_modes: ispeed %d", baud);                          debug3("tty_parse_modes: ispeed %d", baud);
                         if (failure != -1 && cfsetispeed(&tio, baud_to_speed(baud)) == -1)                          if (failure != -1 && cfsetispeed(&tio, baud_to_speed(baud)) == -1)
                                 error("cfsetispeed failed for %d", baud);                                  error("cfsetispeed failed for %d", baud);
                         break;                          break;
Line 368 
Line 368 
                 case TTY_OP_OSPEED_PROTO2:                  case TTY_OP_OSPEED_PROTO2:
                         n_bytes += 4;                          n_bytes += 4;
                         baud = packet_get_int();                          baud = packet_get_int();
                         debug2("tty_parse_modes: ospeed %d", baud);                          debug3("tty_parse_modes: ospeed %d", baud);
                         if (failure != -1 && cfsetospeed(&tio, baud_to_speed(baud)) == -1)                          if (failure != -1 && cfsetospeed(&tio, baud_to_speed(baud)) == -1)
                                 error("cfsetospeed failed for %d", baud);                                  error("cfsetospeed failed for %d", baud);
                         break;                          break;
Line 377 
Line 377 
         case OP: \          case OP: \
           n_bytes += arg_size; \            n_bytes += arg_size; \
           tio.c_cc[NAME] = get_arg(); \            tio.c_cc[NAME] = get_arg(); \
           debug2("tty_parse_modes: %d %d", OP, tio.c_cc[NAME]); \            debug3("tty_parse_modes: %d %d", OP, tio.c_cc[NAME]); \
           break;            break;
 #define TTYMODE(NAME, FIELD, OP) \  #define TTYMODE(NAME, FIELD, OP) \
         case OP: \          case OP: \
Line 386 
Line 386 
             tio.FIELD |= NAME; \              tio.FIELD |= NAME; \
           else \            else \
             tio.FIELD &= ~NAME; \              tio.FIELD &= ~NAME; \
           debug2("tty_parse_modes: %d %d", OP, arg); \            debug3("tty_parse_modes: %d %d", OP, arg); \
           break;            break;
   
 #include "ttymodes.h"  #include "ttymodes.h"
Line 396 
Line 396 
   
                 default:                  default:
                         debug("Ignoring unsupported tty mode opcode %d (0x%x)",                          debug("Ignoring unsupported tty mode opcode %d (0x%x)",
                               opcode, opcode);                              opcode, opcode);
                         if (!compat20) {                          if (!compat20) {
                                 /*                                  /*
                                  * SSH1:                                   * SSH1:
Line 422 
Line 422 
                                          * more coming after the mode data.                                           * more coming after the mode data.
                                          */                                           */
                                         log("parse_tty_modes: unknown opcode %d", opcode);                                          log("parse_tty_modes: unknown opcode %d", opcode);
                                         packet_integrity_check(0, 1, SSH_CMSG_REQUEST_PTY);  
                                         goto set;                                          goto set;
                                 }                                  }
                         } else {                          } else {

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.13.2.2