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

Diff for /src/usr.bin/ssh/progressmeter.c between version 1.39 and 1.40

version 1.39, 2013/06/02 13:33:05 version 1.40, 2013/09/19 00:24:52
Line 64 
Line 64 
 static time_t start;            /* start progress */  static time_t start;            /* start progress */
 static time_t last_update;      /* last progress update */  static time_t last_update;      /* last progress update */
 static char *file;              /* name of the file being transferred */  static char *file;              /* name of the file being transferred */
   static off_t start_pos;         /* initial position of transfer */
 static off_t end_pos;           /* ending position of transfer */  static off_t end_pos;           /* ending position of transfer */
 static off_t cur_pos;           /* transfer position as of last refresh */  static off_t cur_pos;           /* transfer position as of last refresh */
 static volatile off_t *counter; /* progress counter */  static volatile off_t *counter; /* progress counter */
Line 127 
Line 128 
         int i, len;          int i, len;
         int file_len;          int file_len;
   
         transferred = *counter - cur_pos;          transferred = *counter - (cur_pos ? cur_pos : start_pos);
         cur_pos = *counter;          cur_pos = *counter;
         now = monotime();          now = monotime();
         bytes_left = end_pos - cur_pos;          bytes_left = end_pos - cur_pos;
Line 137 
Line 138 
         else {          else {
                 elapsed = now - start;                  elapsed = now - start;
                 /* Calculate true total speed when done */                  /* Calculate true total speed when done */
                 transferred = end_pos;                  transferred = end_pos - start_pos;
                 bytes_per_second = 0;                  bytes_per_second = 0;
         }          }
   
Line 249 
Line 250 
 {  {
         start = last_update = monotime();          start = last_update = monotime();
         file = f;          file = f;
           start_pos = *ctr;
         end_pos = filesize;          end_pos = filesize;
         cur_pos = 0;          cur_pos = 0;
         counter = ctr;          counter = ctr;

Legend:
Removed from v.1.39  
changed lines
  Added in v.1.40