- if ((!(iflags & ITEM_UPDATING) || !S_ISREG(the_file_list->files[ndx]->mode)) && f_out >= 0) {
- write_int(f_out, ndx);
- write_shortint(f_out, iflags);
+ if (iflags & ITEM_XNAME_FOLLOWS) {
+ if ((len = read_vstring(f_in, buf, MAXPATHLEN)) < 0)
+ exit_cleanup(RERR_PROTOCOL);
+ } else {
+ *buf = '\0';
+ len = -1;
+ }
+ *len_ptr = len;
+
+ /* Temporary handling of 2.6.4pre3 */
+ if (iflags & ITEM_DUMMY_BIT && iflags & (ITEM_LOCAL_CHANGE|ITEM_TRANSFER))
+ iflags &= ~ITEM_DUMMY_BIT;
+
+ if (iflags & ITEM_TRANSFER) {
+ if (!S_ISREG(the_file_list->files[ndx]->mode)) {
+ rprintf(FERROR,
+ "received request to transfer non-regular file: %d [%s]\n",
+ ndx, who_am_i());
+ exit_cleanup(RERR_PROTOCOL);
+ }
+ } else if (f_out >= 0) {
+ write_ndx_and_attrs(f_out, ndx, iflags,
+ fnamecmp_type, buf, len);