[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.31 and 1.32

version 1.31, 2017/04/30 23:13:25 version 1.32, 2017/04/30 23:26:54
Line 57 
Line 57 
   
 #define TTY_OP_END              0  #define TTY_OP_END              0
 /*  /*
  * uint32 (u_int) follows speed in SSH1 and SSH2   * uint32 (u_int) follows speed.
  */   */
 #define TTY_OP_ISPEED_PROTO1    192  #define TTY_OP_ISPEED   128
 #define TTY_OP_OSPEED_PROTO1    193  #define TTY_OP_OSPEED   129
 #define TTY_OP_ISPEED_PROTO2    128  
 #define TTY_OP_OSPEED_PROTO2    129  
   
 /*  /*
  * Converts POSIX speed_t to a baud rate.  The values of the   * Converts POSIX speed_t to a baud rate.  The values of the
Line 254 
Line 252 
         struct termios tio;          struct termios tio;
         int baud;          int baud;
         Buffer buf;          Buffer buf;
         int tty_op_ospeed, tty_op_ispeed;  
   
         buffer_init(&buf);          buffer_init(&buf);
         tty_op_ospeed = TTY_OP_OSPEED_PROTO2;  
         tty_op_ispeed = TTY_OP_ISPEED_PROTO2;  
   
         if (tiop == NULL) {          if (tiop == NULL) {
                 if (fd == -1) {                  if (fd == -1) {
Line 274 
Line 269 
   
         /* Store input and output baud rates. */          /* Store input and output baud rates. */
         baud = speed_to_baud(cfgetospeed(&tio));          baud = speed_to_baud(cfgetospeed(&tio));
         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));
         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. */
Line 334 
Line 329 
                 case TTY_OP_END:                  case TTY_OP_END:
                         goto set;                          goto set;
   
                 /* XXX: future conflict possible */                  case TTY_OP_ISPEED:
                 case TTY_OP_ISPEED_PROTO1:  
                 case TTY_OP_ISPEED_PROTO2:  
                         n_bytes += 4;                          n_bytes += 4;
                         baud = packet_get_int();                          baud = packet_get_int();
                         if (failure != -1 &&                          if (failure != -1 &&
Line 344 
Line 337 
                                 error("cfsetispeed failed for %d", baud);                                  error("cfsetispeed failed for %d", baud);
                         break;                          break;
   
                 /* XXX: future conflict possible */                  case TTY_OP_OSPEED:
                 case TTY_OP_OSPEED_PROTO1:  
                 case TTY_OP_OSPEED_PROTO2:  
                         n_bytes += 4;                          n_bytes += 4;
                         baud = packet_get_int();                          baud = packet_get_int();
                         if (failure != -1 &&                          if (failure != -1 &&

Legend:
Removed from v.1.31  
changed lines
  Added in v.1.32