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

Diff for /src/usr.bin/rsync/downloader.c between version 1.11 and 1.12

version 1.11, 2019/02/16 10:47:20 version 1.12, 2019/02/16 16:55:35
Line 296 
Line 296 
 int  int
 rsync_downloader(struct download *p, struct sess *sess, int *ofd)  rsync_downloader(struct download *p, struct sess *sess, int *ofd)
 {  {
           int              c;
         int32_t          idx, rawtok;          int32_t          idx, rawtok;
         const struct flist *f;          const struct flist *f;
         size_t           sz, tok;          size_t           sz, tok;
Line 447 
Line 448 
          * a token indicator.           * a token indicator.
          */           */
   
   again:
         assert(p->state == DOWNLOAD_READ_REMOTE);          assert(p->state == DOWNLOAD_READ_REMOTE);
         assert(p->fname != NULL);          assert(p->fname != NULL);
         assert(p->fd != -1);          assert(p->fd != -1);
Line 475 
Line 477 
                 LOG4(sess, "%s: received %zu B block", p->fname, sz);                  LOG4(sess, "%s: received %zu B block", p->fname, sz);
                 MD4_Update(&p->ctx, buf, sz);                  MD4_Update(&p->ctx, buf, sz);
                 free(buf);                  free(buf);
   
                   /* Fast-track more reads as they arrive. */
   
                   if ((c = io_read_check(sess, p->fdin)) < 0) {
                           ERRX1(sess, "io_read_check");
                           goto out;
                   } else if (c > 0)
                           goto again;
   
                 return 1;                  return 1;
         } else if (rawtok < 0) {          } else if (rawtok < 0) {
                 tok = -rawtok - 1;                  tok = -rawtok - 1;
Line 505 
Line 516 
                 p->total += sz;                  p->total += sz;
                 LOG4(sess, "%s: copied %zu B", p->fname, sz);                  LOG4(sess, "%s: copied %zu B", p->fname, sz);
                 MD4_Update(&p->ctx, buf, sz);                  MD4_Update(&p->ctx, buf, sz);
   
                   /* Fast-track more reads as they arrive. */
   
                   if ((c = io_read_check(sess, p->fdin)) < 0) {
                           ERRX1(sess, "io_read_check");
                           goto out;
                   } else if (c > 0)
                           goto again;
   
                 return 1;                  return 1;
         }          }
   

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12