ITEM_TRANSFER. Yes, it allowed some kludge code that made backward
compatibility seamless, but it made it impossible to remove the hack
in the future. This way, the backward compatibility is just
slightly inaccurate in the display of the first letter in the %i
output, and the only hack can be safely removed without causing
problems.
if (protocol_version >= 29) {
if (ndx >= 0)
write_int(sock_f_out, ndx);
if (protocol_version >= 29) {
if (ndx >= 0)
write_int(sock_f_out, ndx);
- /* XXX Temorary compatibility hack */
- if (iflags & (ITEM_TRANSFER|ITEM_LOCAL_CHANGE))
- iflags |= ITEM_REPORT_XATTRS; /* ITEM_UPDATE */
write_shortint(sock_f_out, iflags);
if (hlink)
write_vstring(sock_f_out, hlink, strlen(hlink));
write_shortint(sock_f_out, iflags);
if (hlink)
write_vstring(sock_f_out, hlink, strlen(hlink));
#define DEL_TERSE (1<<3)
/* For use by the itemize_changes code */
#define DEL_TERSE (1<<3)
/* For use by the itemize_changes code */
-#define ITEM_REPORT_XATTRS (1<<0)
+#define ITEM_TRANSFER (1<<0)
#define ITEM_REPORT_CHECKSUM (1<<1)
#define ITEM_REPORT_SIZE (1<<2)
#define ITEM_REPORT_TIME (1<<3)
#define ITEM_REPORT_CHECKSUM (1<<1)
#define ITEM_REPORT_SIZE (1<<2)
#define ITEM_REPORT_TIME (1<<3)
#define ITEM_USING_ALT_BASIS (1<<8)
#define ITEM_HARD_LINKED (1<<9)
#define ITEM_LOCAL_CHANGE (1<<10)
#define ITEM_USING_ALT_BASIS (1<<8)
#define ITEM_HARD_LINKED (1<<9)
#define ITEM_LOCAL_CHANGE (1<<10)
-#define ITEM_TRANSFER (1<<11)
+#define ITEM_REPORT_XATTRS (1<<11)
/* These are outside the range of the transmitted flags. */
#define ITEM_NO_DEST_AND_NO_UPDATE (1<<16) /* used by itemize() */
#define ITEM_MISSING_DATA (1<<16) /* used by log_formatted() */
/* These are outside the range of the transmitted flags. */
#define ITEM_NO_DEST_AND_NO_UPDATE (1<<16) /* used by itemize() */
#define ITEM_MISSING_DATA (1<<16) /* used by log_formatted() */
#define SIGNIFICANT_ITEM_FLAGS (ITEM_TRANSFER | ITEM_REPORT_CHECKSUM \
| ITEM_REPORT_SIZE | ITEM_REPORT_TIME | ITEM_REPORT_PERMS \
#define SIGNIFICANT_ITEM_FLAGS (ITEM_TRANSFER | ITEM_REPORT_CHECKSUM \
| ITEM_REPORT_SIZE | ITEM_REPORT_TIME | ITEM_REPORT_PERMS \
- | ITEM_REPORT_OWNER | ITEM_REPORT_GROUP | ITEM_IS_NEW)
+ | ITEM_REPORT_OWNER | ITEM_REPORT_GROUP | ITEM_REPORT_XATTRS \
+ | ITEM_IS_NEW)
/* Log-message categories. FLOG and FCLIENT are only used on the daemon
/* Log-message categories. FLOG and FCLIENT are only used on the daemon
- /* 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) {
}
if (iflags & ITEM_TRANSFER) {
log_item(file, &stats, iflags, NULL);
write_int(f_out, i);
if (protocol_version >= 29)
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);
write_int(f_out, i);
if (protocol_version >= 29)
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) {
write_sum_head(f_out, s);
if (verbose > 2) {