diff options
author | Wayne Davison <wayned@samba.org> | 2007-12-08 11:39:03 -0800 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2007-12-08 11:39:47 -0800 |
commit | 65b4e4b2a93de8e5bff93b5c7a2a529613cbc5e8 (patch) | |
tree | ffd109f2b665ee86fd49e330f91ded839cc0b887 /rsync.c | |
parent | 37adeae73e9e590082d1247eeb8f216db18b24dc (diff) | |
download | android_external_rsync-65b4e4b2a93de8e5bff93b5c7a2a529613cbc5e8.tar.gz android_external_rsync-65b4e4b2a93de8e5bff93b5c7a2a529613cbc5e8.tar.bz2 android_external_rsync-65b4e4b2a93de8e5bff93b5c7a2a529613cbc5e8.zip |
Updated indexing for accurate progress and improved raw ndx values.
The sending side now has a sorted file-list in iconv mode so that it
can output progress in sorted order. Simplified the over-the-wire
index values to ensure both sides will always agree on the values.
Optimized the allocation of the dir_flist->sorted array on the
receiving side with --iconv and incremental recursion.
Diffstat (limited to 'rsync.c')
-rw-r--r-- | rsync.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -264,12 +264,13 @@ int read_ndx_and_attrs(int f_in, int *iflag_ptr, uchar *type_ptr, } if (!(flist = flist_for_ndx(ndx))) { + int start, used; invalid_ndx: + start = first_flist ? first_flist->ndx_start : 0; + used = first_flist ? first_flist->used : 0; rprintf(FERROR, "Invalid file index: %d (%d - %d) with iflags %x [%s]\n", - ndx, first_flist ? first_flist->ndx_start - 1 : -1, - first_flist ? first_flist->prev->ndx_end : -1, - iflags, who_am_i()); + ndx, start - 1, start + used -1, iflags, who_am_i()); exit_cleanup(RERR_PROTOCOL); } cur_flist = flist; @@ -572,7 +573,7 @@ struct file_list *flist_for_ndx(int ndx) return NULL; flist = flist->prev; } - while (ndx > flist->ndx_end) { + while (ndx >= flist->ndx_start + flist->used) { if (!(flist = flist->next)) return NULL; } |