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

Diff for /src/usr.bin/ssh/clientloop.c between version 1.232 and 1.233

version 1.232, 2011/04/17 22:42:41 version 1.233, 2011/05/06 21:34:32
Line 122 
Line 122 
  */   */
 extern char *host;  extern char *host;
   
 /* Force TTY allocation */  
 extern int force_tty_flag;  
   
 /*  /*
  * Flag to indicate that we have received a window change signal which has   * Flag to indicate that we have received a window change signal which has
  * not yet been processed.  This will cause a message indicating the new   * not yet been processed.  This will cause a message indicating the new
Line 654 
Line 651 
                 atomicio(vwrite, fileno(stderr), buffer_ptr(berr),                  atomicio(vwrite, fileno(stderr), buffer_ptr(berr),
                     buffer_len(berr));                      buffer_len(berr));
   
         leave_raw_mode(force_tty_flag);          leave_raw_mode(options.request_tty == REQUEST_TTY_FORCE);
   
         /*          /*
          * Free (and clear) the buffer to reduce the amount of data that gets           * Free (and clear) the buffer to reduce the amount of data that gets
Line 675 
Line 672 
         buffer_init(bout);          buffer_init(bout);
         buffer_init(berr);          buffer_init(berr);
   
         enter_raw_mode(force_tty_flag);          enter_raw_mode(options.request_tty == REQUEST_TTY_FORCE);
 }  }
   
 static void  static void
Line 817 
Line 814 
         bzero(&fwd, sizeof(fwd));          bzero(&fwd, sizeof(fwd));
         fwd.listen_host = fwd.connect_host = NULL;          fwd.listen_host = fwd.connect_host = NULL;
   
         leave_raw_mode(force_tty_flag);          leave_raw_mode(options.request_tty == REQUEST_TTY_FORCE);
         handler = signal(SIGINT, SIG_IGN);          handler = signal(SIGINT, SIG_IGN);
         cmd = s = read_passphrase("\r\nssh> ", RP_ECHO);          cmd = s = read_passphrase("\r\nssh> ", RP_ECHO);
         if (s == NULL)          if (s == NULL)
Line 921 
Line 918 
   
 out:  out:
         signal(SIGINT, handler);          signal(SIGINT, handler);
         enter_raw_mode(force_tty_flag);          enter_raw_mode(options.request_tty == REQUEST_TTY_FORCE);
         if (cmd)          if (cmd)
                 xfree(cmd);                  xfree(cmd);
         if (fwd.listen_host != NULL)          if (fwd.listen_host != NULL)
Line 1040 
Line 1037 
                                  * more new connections).                                   * more new connections).
                                  */                                   */
                                 /* Restore tty modes. */                                  /* Restore tty modes. */
                                 leave_raw_mode(force_tty_flag);                                  leave_raw_mode(
                                       options.request_tty == REQUEST_TTY_FORCE);
   
                                 /* Stop listening for new connections. */                                  /* Stop listening for new connections. */
                                 channel_stop_listening();                                  channel_stop_listening();
Line 1332 
Line 1330 
 {  {
         channel_cancel_cleanup(id);          channel_cancel_cleanup(id);
         session_closed = 1;          session_closed = 1;
         leave_raw_mode(force_tty_flag);          leave_raw_mode(options.request_tty == REQUEST_TTY_FORCE);
 }  }
   
 /*  /*
Line 1403 
Line 1401 
         signal(SIGWINCH, window_change_handler);          signal(SIGWINCH, window_change_handler);
   
         if (have_pty)          if (have_pty)
                 enter_raw_mode(force_tty_flag);                  enter_raw_mode(options.request_tty == REQUEST_TTY_FORCE);
   
         if (compat20) {          if (compat20) {
                 session_ident = ssh2_chan_id;                  session_ident = ssh2_chan_id;
Line 1547 
Line 1545 
         channel_free_all();          channel_free_all();
   
         if (have_pty)          if (have_pty)
                 leave_raw_mode(force_tty_flag);                  leave_raw_mode(options.request_tty == REQUEST_TTY_FORCE);
   
         /* restore blocking io */          /* restore blocking io */
         if (!isatty(fileno(stdin)))          if (!isatty(fileno(stdin)))
Line 2124 
Line 2122 
 void  void
 cleanup_exit(int i)  cleanup_exit(int i)
 {  {
         leave_raw_mode(force_tty_flag);          leave_raw_mode(options.request_tty == REQUEST_TTY_FORCE);
         leave_non_blocking();          leave_non_blocking();
         if (options.control_path != NULL && muxserver_sock != -1)          if (options.control_path != NULL && muxserver_sock != -1)
                 unlink(options.control_path);                  unlink(options.control_path);

Legend:
Removed from v.1.232  
changed lines
  Added in v.1.233