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

Diff for /src/usr.bin/rsync/blocks.c between version 1.21 and 1.22

version 1.21, 2021/11/03 14:42:12 version 1.22, 2024/02/27 11:28:30
Line 280 
Line 280 
                             blk->len, blk->idx);                              blk->len, blk->idx);
                         tok = -(blk->idx + 1);                          tok = -(blk->idx + 1);
   
                           hash_file_buf(&st->ctx, st->map + last, sz + blk->len);
   
                         /*                          /*
                          * Write the data we have, then follow it with                           * Write the data we have, then follow it with
                          * the tag of the block that matches.                           * the tag of the block that matches.
Line 293 
Line 295 
                         st->total += blk->len;                          st->total += blk->len;
                         st->offs += blk->len;                          st->offs += blk->len;
                         st->hint = blk->idx + 1;                          st->hint = blk->idx + 1;
   
                         return;                          return;
                 }                  }
   
Line 308 
Line 311 
                 st->curlen = st->curpos + sz;                  st->curlen = st->curpos + sz;
                 st->curtok = 0;                  st->curtok = 0;
                 st->curst = sz ? BLKSTAT_DATA : BLKSTAT_TOK;                  st->curst = sz ? BLKSTAT_DATA : BLKSTAT_TOK;
   
                   hash_file_buf(&st->ctx, st->map + st->curpos, sz);
         } else {          } else {
                 st->curpos = 0;                  st->curpos = 0;
                 st->curlen = st->mapsz;                  st->curlen = st->mapsz;
                 st->curtok = 0;                  st->curtok = 0;
                 st->curst = st->mapsz ? BLKSTAT_DATA : BLKSTAT_TOK;                  st->curst = st->mapsz ? BLKSTAT_DATA : BLKSTAT_TOK;
                 st->dirty = st->total = st->mapsz;                  st->dirty = st->total = st->mapsz;
   
                   hash_file_buf(&st->ctx, st->map, st->mapsz);
   
                 LOG4("%s: flushing whole file %zu B",                  LOG4("%s: flushing whole file %zu B",
                     path, st->mapsz);                      path, st->mapsz);

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22