[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.199 and 1.200

version 1.199, 2008/06/12 21:06:25 version 1.200, 2008/07/10 18:08:11
Line 144 
Line 144 
 static Buffer stdin_buffer;     /* Buffer for stdin data. */  static Buffer stdin_buffer;     /* Buffer for stdin data. */
 static Buffer stdout_buffer;    /* Buffer for stdout data. */  static Buffer stdout_buffer;    /* Buffer for stdout data. */
 static Buffer stderr_buffer;    /* Buffer for stderr data. */  static Buffer stderr_buffer;    /* Buffer for stderr data. */
 static u_long stdin_bytes, stdout_bytes, stderr_bytes;  
 static u_int buffer_high;/* Soft max buffer size. */  static u_int buffer_high;/* Soft max buffer size. */
 static int connection_in;       /* Connection to server (input). */  static int connection_in;       /* Connection to server (input). */
 static int connection_out;      /* Connection to server (output). */  static int connection_out;      /* Connection to server (output). */
Line 429 
Line 428 
                 packet_put_string(buffer_ptr(&stdin_buffer), len);                  packet_put_string(buffer_ptr(&stdin_buffer), len);
                 packet_send();                  packet_send();
                 buffer_consume(&stdin_buffer, len);                  buffer_consume(&stdin_buffer, len);
                 stdin_bytes += len;  
                 /* If we have a pending EOF, send it now. */                  /* If we have a pending EOF, send it now. */
                 if (stdin_eof && buffer_len(&stdin_buffer) == 0) {                  if (stdin_eof && buffer_len(&stdin_buffer) == 0) {
                         packet_start(SSH_CMSG_EOF);                          packet_start(SSH_CMSG_EOF);
Line 1194 
Line 1192 
                 }                  }
                 /* Consume printed data from the buffer. */                  /* Consume printed data from the buffer. */
                 buffer_consume(&stdout_buffer, len);                  buffer_consume(&stdout_buffer, len);
                 stdout_bytes += len;  
         }          }
         /* Write buffered output to stderr. */          /* Write buffered output to stderr. */
         if (FD_ISSET(fileno(stderr), writeset)) {          if (FD_ISSET(fileno(stderr), writeset)) {
Line 1215 
Line 1212 
                 }                  }
                 /* Consume printed characters from the buffer. */                  /* Consume printed characters from the buffer. */
                 buffer_consume(&stderr_buffer, len);                  buffer_consume(&stderr_buffer, len);
                 stderr_bytes += len;  
         }          }
 }  }
   
Line 1290 
Line 1286 
         fd_set *readset = NULL, *writeset = NULL;          fd_set *readset = NULL, *writeset = NULL;
         double start_time, total_time;          double start_time, total_time;
         int max_fd = 0, max_fd2 = 0, len, rekeying = 0;          int max_fd = 0, max_fd2 = 0, len, rekeying = 0;
           u_int64_t ibytes, obytes;
         u_int nalloc = 0;          u_int nalloc = 0;
         char buf[100];          char buf[100];
   
Line 1321 
Line 1318 
                 max_fd = MAX(max_fd, fileno(stdout));                  max_fd = MAX(max_fd, fileno(stdout));
                 max_fd = MAX(max_fd, fileno(stderr));                  max_fd = MAX(max_fd, fileno(stderr));
         }          }
         stdin_bytes = 0;  
         stdout_bytes = 0;  
         stderr_bytes = 0;  
         quit_pending = 0;          quit_pending = 0;
         escape_char1 = escape_char_arg;          escape_char1 = escape_char_arg;
   
Line 1509 
Line 1503 
                         break;                          break;
                 }                  }
                 buffer_consume(&stdout_buffer, len);                  buffer_consume(&stdout_buffer, len);
                 stdout_bytes += len;  
         }          }
   
         /* Output any buffered data for stderr. */          /* Output any buffered data for stderr. */
Line 1521 
Line 1514 
                         break;                          break;
                 }                  }
                 buffer_consume(&stderr_buffer, len);                  buffer_consume(&stderr_buffer, len);
                 stderr_bytes += len;  
         }          }
   
         /* Clear and free any buffers. */          /* Clear and free any buffers. */
Line 1532 
Line 1524 
   
         /* Report bytes transferred, and transfer rates. */          /* Report bytes transferred, and transfer rates. */
         total_time = get_current_time() - start_time;          total_time = get_current_time() - start_time;
         debug("Transferred: stdin %lu, stdout %lu, stderr %lu bytes in %.1f "          packet_get_state(MODE_IN, NULL, NULL, NULL, &ibytes);
             "seconds", stdin_bytes, stdout_bytes, stderr_bytes, total_time);          packet_get_state(MODE_OUT, NULL, NULL, NULL, &obytes);
           verbose("Transferred: sent %llu, received %llu bytes, in %.1f seconds",
               obytes, ibytes, total_time);
         if (total_time > 0)          if (total_time > 0)
                 debug("Bytes per second: stdin %.1f, stdout %.1f, stderr %.1f",                  verbose("Bytes per second: sent %.1f, received %.1f",
                     stdin_bytes / total_time, stdout_bytes / total_time,                      obytes / total_time, ibytes / total_time);
                     stderr_bytes / total_time);  
   
         /* Return the exit status of the program. */          /* Return the exit status of the program. */
         debug("Exit status %d", exit_status);          debug("Exit status %d", exit_status);
         return exit_status;          return exit_status;

Legend:
Removed from v.1.199  
changed lines
  Added in v.1.200