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

version 1.31, 2000/08/19 21:55:52 version 1.32, 2000/08/19 22:21:19
Line 471 
Line 471 
 int  int
 process_escapes(Buffer *bin, Buffer *bout, Buffer *berr, char *buf, int len)  process_escapes(Buffer *bin, Buffer *bout, Buffer *berr, char *buf, int len)
 {  {
           char string[1024];
         pid_t pid;          pid_t pid;
         int bytes = 0;          int bytes = 0;
         unsigned int i;          unsigned int i;
Line 490 
Line 491 
                         switch (ch) {                          switch (ch) {
                         case '.':                          case '.':
                                 /* Terminate the connection. */                                  /* Terminate the connection. */
                                 snprintf(buf, sizeof buf, "%c.\r\n", escape_char);                                  snprintf(string, sizeof string, "%c.\r\n", escape_char);
                                 buffer_append(berr, buf, strlen(buf));                                  buffer_append(berr, string, strlen(string));
                                 /*stderr_bytes += strlen(buf); XXX*/                                  /*stderr_bytes += strlen(string); XXX*/
   
                                 quit_pending = 1;                                  quit_pending = 1;
                                 return -1;                                  return -1;
Line 500 
Line 501 
                         case 'Z' - 64:                          case 'Z' - 64:
                                 /* Suspend the program. */                                  /* Suspend the program. */
                                 /* Print a message to that effect to the user. */                                  /* Print a message to that effect to the user. */
                                 snprintf(buf, sizeof buf, "%c^Z [suspend ssh]\r\n", escape_char);                                  snprintf(string, sizeof string, "%c^Z [suspend ssh]\r\n", escape_char);
                                 buffer_append(berr, buf, strlen(buf));                                  buffer_append(berr, string, strlen(string));
                                 /*stderr_bytes += strlen(buf); XXX*/                                  /*stderr_bytes += strlen(string); XXX*/
   
                                 /* Restore terminal modes and suspend. */                                  /* Restore terminal modes and suspend. */
                                 client_suspend_self(bin, bout, berr);                                  client_suspend_self(bin, bout, berr);
Line 556 
Line 557 
                                 continue; /*XXX ? */                                  continue; /*XXX ? */
   
                         case '?':                          case '?':
                                 snprintf(buf, sizeof buf,                                  snprintf(string, sizeof string,
 "%c?\r\n\  "%c?\r\n\
 Supported escape sequences:\r\n\  Supported escape sequences:\r\n\
 ~.  - terminate connection\r\n\  ~.  - terminate connection\r\n\
Line 567 
Line 568 
 ~~  - send the escape character by typing it twice\r\n\  ~~  - send the escape character by typing it twice\r\n\
 (Note that escapes are only recognized immediately after newline.)\r\n",  (Note that escapes are only recognized immediately after newline.)\r\n",
                                          escape_char);                                           escape_char);
                                 buffer_append(berr, buf, strlen(buf));                                  buffer_append(berr, string, strlen(string));
                                 continue;                                  continue;
   
                         case '#':                          case '#':
                                 snprintf(buf, sizeof buf, "%c#\r\n", escape_char);                                  snprintf(string, sizeof string, "%c#\r\n", escape_char);
                                 buffer_append(berr, buf, strlen(buf));                                  buffer_append(berr, string, strlen(string));
                                 s = channel_open_message();                                  s = channel_open_message();
                                 buffer_append(berr, s, strlen(s));                                  buffer_append(berr, s, strlen(s));
                                 xfree(s);                                  xfree(s);

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