X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/dec71e94f3527d50425a0f3665a557b6800094bc..ef20efcbb69274e423321d7ac27bfe868bca65aa:/sender.c diff --git a/sender.c b/sender.c index 4d8fe2cb..d4387a47 100644 --- a/sender.c +++ b/sender.c @@ -153,15 +153,11 @@ int read_iflags(int f_in, int f_out, int ndx, char *buf) len = -1; } - /* XXX Temporary compatibility hack */ - if (iflags & ITEM_REPORT_XATTRS) { /* old ITEM_UPDATE */ - iflags &= ~ITEM_REPORT_XATTRS; - if (!(iflags & (ITEM_TRANSFER|ITEM_LOCAL_CHANGE))) { - if (S_ISREG(the_file_list->files[ndx]->mode)) - iflags |= ITEM_TRANSFER; - else - iflags |= ITEM_LOCAL_CHANGE; - } + /* XXX Temporary backward compatibility when talking to 2.6.4pre[12] */ + if (protocol_version >= 29 && iflags & ITEM_TRANSFER + && !S_ISREG(the_file_list->files[ndx]->mode)) { + iflags &= ~ITEM_TRANSFER; + iflags |= ITEM_LOCAL_CHANGE; } if (iflags & ITEM_TRANSFER) { @@ -173,7 +169,8 @@ int read_iflags(int f_in, int f_out, int ndx, char *buf) } } else if (f_out >= 0) { write_int(f_out, ndx); - write_shortint(f_out, isave /*XXX iflags */); + if (protocol_version >= 29) + write_shortint(f_out, isave /*XXX iflags */); if (len >= 0) write_vstring(f_out, buf, len); } @@ -256,7 +253,7 @@ void send_files(struct file_list *flist, int f_out, int f_in) log_item(file, &stats, iflags, NULL); write_int(f_out, i); if (protocol_version >= 29) - write_shortint(f_out, iflags | ITEM_REPORT_XATTRS); + write_shortint(f_out, iflags); continue; } @@ -309,7 +306,7 @@ void send_files(struct file_list *flist, int f_out, int f_in) write_int(f_out, i); if (protocol_version >= 29) - write_shortint(f_out, iflags | ITEM_REPORT_XATTRS); + write_shortint(f_out, iflags); write_sum_head(f_out, s); if (verbose > 2) { @@ -325,6 +322,9 @@ void send_files(struct file_list *flist, int f_out, int f_in) set_compression(fname); match_sums(f_out, s, mbuf, st.st_size); + if (do_progress) + end_progress(st.st_size); + if (!log_before_transfer) log_item(file, &initial_stats, iflags, NULL);