2 * Routines only used by the receiving process.
4 * Copyright (C) 1996-2000 Andrew Tridgell
5 * Copyright (C) 1996 Paul Mackerras
6 * Copyright (C) 2003-2009 Wayne Davison
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 3 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, visit the http://fsf.org website.
28 extern int inc_recurse;
29 extern int log_before_transfer;
30 extern int stdout_format_has_i;
31 extern int logfile_format_has_i;
32 extern int csum_length;
33 extern int read_batch;
34 extern int write_batch;
35 extern int batch_gen_fd;
36 extern int protocol_version;
37 extern int relative_paths;
38 extern int preserve_hard_links;
39 extern int preserve_perms;
40 extern int preserve_xattrs;
41 extern int basis_dir_cnt;
42 extern int make_backups;
43 extern int cleanup_got_literal;
44 extern int remove_source_files;
45 extern int append_mode;
46 extern int sparse_files;
47 extern int keep_partial;
48 extern int checksum_len;
49 extern int checksum_seed;
51 extern int delay_updates;
52 extern mode_t orig_umask;
53 extern struct stats stats;
55 extern char *partial_dir;
56 extern char *basis_dir[MAX_BASIS_DIRS+1];
57 extern char sender_file_sum[MAX_DIGEST_LEN];
58 extern struct file_list *cur_flist, *first_flist, *dir_flist;
59 extern filter_rule_list daemon_filter_list;
61 static struct bitbag *delayed_bits = NULL;
62 static int phase = 0, redoing = 0;
63 static flist_ndx_list batch_redo_list;
64 /* We're either updating the basis file or an identical copy: */
65 static int updating_basis_or_equiv;
67 #define TMPNAME_SUFFIX ".XXXXXX"
68 #define TMPNAME_SUFFIX_LEN ((int)sizeof TMPNAME_SUFFIX - 1)
69 #define MAX_UNIQUE_NUMBER 999999
70 #define MAX_UNIQUE_LOOP 100
72 /* get_tmpname() - create a tmp filename for a given filename
74 * If a tmpdir is defined, use that as the directory to put it in. Otherwise,
75 * the tmp filename is in the same directory as the given name. Note that
76 * there may be no directory at all in the given name!
78 * The tmp filename is basically the given filename with a dot prepended, and
79 * .XXXXXX appended (for mkstemp() to put its unique gunk in). We take care
80 * to not exceed either the MAXPATHLEN or NAME_MAX, especially the last, as
81 * the basename basically becomes 8 characters longer. In such a case, the
82 * original name is shortened sufficiently to make it all fit.
84 * If the make_unique arg is True, the XXXXXX string is replaced with a unique
85 * string that doesn't exist at the time of the check. This is intended to be
86 * used for creating hard links, symlinks, devices, and special files, since
87 * normal files should be handled by mkstemp() for safety.
89 * Of course, the only reason the file is based on the original name is to
90 * make it easier to figure out what purpose a temp file is serving when a
91 * transfer is in progress. */
92 int get_tmpname(char *fnametmp, const char *fname, BOOL make_unique)
94 int maxname, added, length = 0;
99 /* Note: this can't overflow, so the return value is safe */
100 length = strlcpy(fnametmp, tmpdir, MAXPATHLEN - 2);
101 fnametmp[length++] = '/';
104 if ((f = strrchr(fname, '/')) != NULL) {
108 /* copy up to and including the slash */
109 strlcpy(fnametmp, fname, length + 1);
113 fnametmp[length++] = '.';
115 /* The maxname value is bufsize, and includes space for the '\0'.
116 * NAME_MAX needs an extra -1 for the name's leading dot. */
117 maxname = MIN(MAXPATHLEN - length - TMPNAME_SUFFIX_LEN,
118 NAME_MAX - 1 - TMPNAME_SUFFIX_LEN);
121 rprintf(FERROR_XFER, "temporary filename too long: %s\n", fname);
126 added = strlcpy(fnametmp + length, f, maxname);
127 if (added >= maxname)
129 suf = fnametmp + length + added;
132 static unsigned counter_limit;
135 if (!counter_limit) {
136 counter_limit = (unsigned)getpid() + MAX_UNIQUE_LOOP;
137 if (counter_limit > MAX_UNIQUE_NUMBER || counter_limit < MAX_UNIQUE_LOOP)
138 counter_limit = MAX_UNIQUE_LOOP;
140 counter = counter_limit - MAX_UNIQUE_LOOP;
142 /* This doesn't have to be very good because we don't need
143 * to worry about someone trying to guess the values: all
144 * a conflict will do is cause a device, special file, hard
145 * link, or symlink to fail to be created. Also: avoid
146 * using mktemp() due to gcc's annoying warning. */
148 snprintf(suf, TMPNAME_SUFFIX_LEN+1, ".%d", counter);
149 if (access(fnametmp, 0) < 0)
151 if (++counter >= counter_limit)
155 memcpy(suf, TMPNAME_SUFFIX, TMPNAME_SUFFIX_LEN+1);
160 /* Opens a temporary file for writing.
161 * Success: Writes name into fnametmp, returns fd.
162 * Failure: Clobbers fnametmp, returns -1.
163 * Calling cleanup_set() is the caller's job. */
164 int open_tmpfile(char *fnametmp, const char *fname, struct file_struct *file)
168 if (!get_tmpname(fnametmp, fname, False))
171 /* We initially set the perms without the setuid/setgid bits or group
172 * access to ensure that there is no race condition. They will be
173 * correctly updated after the right owner and group info is set.
174 * (Thanks to snabb@epipe.fi for pointing this out.) */
175 fd = do_mkstemp(fnametmp, file->mode & INITACCESSPERMS);
178 /* In most cases parent directories will already exist because their
179 * information should have been previously transferred, but that may
180 * not be the case with -R */
181 if (fd == -1 && relative_paths && errno == ENOENT
182 && make_path(fnametmp, MKP_SKIP_SLASH | MKP_DROP_NAME) == 0) {
183 /* Get back to name with XXXXXX in it. */
184 get_tmpname(fnametmp, fname, False);
185 fd = do_mkstemp(fnametmp, file->mode & INITACCESSPERMS);
190 rsyserr(FERROR_XFER, errno, "mkstemp %s failed",
191 full_fname(fnametmp));
198 static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
199 const char *fname, int fd, OFF_T total_size)
201 static char file_sum1[MAX_DIGEST_LEN];
202 struct map_struct *mapbuf;
203 struct sum_struct sum;
211 read_sum_head(f_in, &sum);
213 if (fd_r >= 0 && size_r > 0) {
214 int32 read_size = MAX(sum.blength * 2, 16*1024);
215 mapbuf = map_file(fd_r, size_r, read_size, sum.blength);
216 if (DEBUG_GTE(DELTASUM, 2)) {
217 rprintf(FINFO, "recv mapped %s of size %s\n",
218 fname_r, big_num(size_r));
223 sum_init(checksum_seed);
225 if (append_mode > 0) {
227 sum.flength = (OFF_T)sum.count * sum.blength;
229 sum.flength -= sum.blength - sum.remainder;
230 if (append_mode == 2) {
231 for (j = CHUNK_SIZE; j < sum.flength; j += CHUNK_SIZE) {
232 if (INFO_GTE(PROGRESS, 1))
233 show_progress(offset, total_size);
234 sum_update(map_ptr(mapbuf, offset, CHUNK_SIZE),
238 if (offset < sum.flength) {
239 int32 len = (int32)(sum.flength - offset);
240 if (INFO_GTE(PROGRESS, 1))
241 show_progress(offset, total_size);
242 sum_update(map_ptr(mapbuf, offset, len), len);
245 offset = sum.flength;
246 if (fd != -1 && (j = do_lseek(fd, offset, SEEK_SET)) != offset) {
247 rsyserr(FERROR_XFER, errno, "lseek of %s returned %s, not %s",
248 full_fname(fname), big_num(j), big_num(offset));
249 exit_cleanup(RERR_FILEIO);
253 while ((i = recv_token(f_in, &data)) != 0) {
254 if (INFO_GTE(PROGRESS, 1))
255 show_progress(offset, total_size);
258 if (DEBUG_GTE(DELTASUM, 3)) {
259 rprintf(FINFO,"data recv %d at %s\n",
263 stats.literal_data += i;
264 cleanup_got_literal = 1;
268 if (fd != -1 && write_file(fd,data,i) != i)
269 goto report_write_error;
275 offset2 = i * (OFF_T)sum.blength;
277 if (i == (int)sum.count-1 && sum.remainder != 0)
280 stats.matched_data += len;
282 if (DEBUG_GTE(DELTASUM, 3)) {
284 "chunk[%d] of size %ld at %s offset=%s\n",
285 i, (long)len, big_num(offset2), big_num(offset));
289 map = map_ptr(mapbuf,offset2,len);
292 sum_update(map, len);
295 if (updating_basis_or_equiv) {
296 if (offset == offset2 && fd != -1) {
298 if (flush_write_file(fd) < 0)
299 goto report_write_error;
301 if ((pos = do_lseek(fd, len, SEEK_CUR)) != offset) {
302 rsyserr(FERROR_XFER, errno,
303 "lseek of %s returned %s, not %s",
305 big_num(pos), big_num(offset));
306 exit_cleanup(RERR_FILEIO);
311 if (fd != -1 && map && write_file(fd, map, len) != (int)len)
312 goto report_write_error;
316 if (flush_write_file(fd) < 0)
317 goto report_write_error;
319 #ifdef HAVE_FTRUNCATE
320 if (inplace && fd != -1
321 && ftruncate(fd, offset) < 0) {
322 rsyserr(FERROR_XFER, errno, "ftruncate failed on %s",
327 if (INFO_GTE(PROGRESS, 1))
328 end_progress(total_size);
330 if (fd != -1 && offset > 0 && sparse_end(fd) != 0) {
332 rsyserr(FERROR_XFER, errno, "write failed on %s",
334 exit_cleanup(RERR_FILEIO);
337 if (sum_end(file_sum1) != checksum_len)
338 overflow_exit("checksum_len"); /* Impossible... */
343 read_buf(f_in, sender_file_sum, checksum_len);
344 if (DEBUG_GTE(DELTASUM, 2))
345 rprintf(FINFO,"got file_sum\n");
346 if (fd != -1 && memcmp(file_sum1, sender_file_sum, checksum_len) != 0)
352 static void discard_receive_data(int f_in, OFF_T length)
354 receive_data(f_in, NULL, -1, 0, NULL, -1, length);
357 static void handle_delayed_updates(char *local_name)
359 char *fname, *partialptr;
362 for (ndx = -1; (ndx = bitbag_next_bit(delayed_bits, ndx)) >= 0; ) {
363 struct file_struct *file = cur_flist->files[ndx];
364 fname = local_name ? local_name : f_name(file, NULL);
365 if ((partialptr = partial_dir_fname(fname)) != NULL) {
366 if (make_backups > 0 && !make_backup(fname, False))
368 if (DEBUG_GTE(RECV, 1)) {
369 rprintf(FINFO, "renaming %s to %s\n",
372 /* We don't use robust_rename() here because the
373 * partial-dir must be on the same drive. */
374 if (do_rename(partialptr, fname) < 0) {
375 rsyserr(FERROR_XFER, errno,
376 "rename failed for %s (from %s)",
377 full_fname(fname), partialptr);
379 if (remove_source_files
380 || (preserve_hard_links && F_IS_HLINKED(file)))
381 send_msg_int(MSG_SUCCESS, ndx);
382 handle_partial_dir(partialptr, PDIR_DELETE);
388 static void no_batched_update(int ndx, BOOL is_redo)
390 struct file_list *flist = flist_for_ndx(ndx, "no_batched_update");
391 struct file_struct *file = flist->files[ndx - flist->ndx_start];
393 rprintf(FERROR_XFER, "(No batched update for%s \"%s\")\n",
394 is_redo ? " resend of" : "", f_name(file, NULL));
396 if (inc_recurse && !dry_run)
397 send_msg_int(MSG_NO_SEND, ndx);
400 static int we_want_redo(int desired_ndx)
402 static int redo_ndx = -1;
404 while (redo_ndx < desired_ndx) {
406 no_batched_update(redo_ndx, True);
407 if ((redo_ndx = flist_ndx_pop(&batch_redo_list)) < 0)
411 if (redo_ndx == desired_ndx) {
419 static int gen_wants_ndx(int desired_ndx, int flist_num)
421 static int next_ndx = -1;
422 static int done_cnt = 0;
423 static BOOL got_eof = False;
428 while (next_ndx < desired_ndx) {
429 if (inc_recurse && flist_num <= done_cnt)
432 no_batched_update(next_ndx, False);
433 if ((next_ndx = read_int(batch_gen_fd)) < 0) {
443 if (next_ndx == desired_ndx) {
452 * main routine for receiver process.
454 * Receiver process runs on the same host as the generator process. */
455 int recv_files(int f_in, char *local_name)
460 char *fname, fbuf[MAXPATHLEN];
461 char xname[MAXPATHLEN];
462 char fnametmp[MAXPATHLEN];
463 char *fnamecmp, *partialptr;
464 char fnamecmpbuf[MAXPATHLEN];
466 struct file_struct *file;
467 struct stats initial_stats;
468 int itemizing = am_server ? logfile_format_has_i : stdout_format_has_i;
469 enum logcode log_code = log_before_transfer ? FLOG : FINFO;
470 int max_phase = protocol_version >= 29 ? 2 : 1;
471 int dflt_perms = (ACCESSPERMS & ~orig_umask);
473 const char *parent_dirname = "";
477 if (DEBUG_GTE(RECV, 1))
478 rprintf(FINFO, "recv_files(%d) starting\n", cur_flist->used);
481 delayed_bits = bitbag_create(cur_flist->used + 1);
486 /* This call also sets cur_flist. */
487 ndx = read_ndx_and_attrs(f_in, &iflags, &fnamecmp_type,
489 if (ndx == NDX_DONE) {
490 if (!am_server && INFO_GTE(PROGRESS, 2) && cur_flist) {
491 set_current_file_index(NULL, 0);
494 if (inc_recurse && first_flist) {
496 ndx = first_flist->used + first_flist->ndx_start;
497 gen_wants_ndx(ndx, first_flist->flist_num);
499 flist_free(first_flist);
502 } else if (read_batch && first_flist) {
503 ndx = first_flist->used;
504 gen_wants_ndx(ndx, first_flist->flist_num);
506 if (++phase > max_phase)
508 if (DEBUG_GTE(RECV, 1))
509 rprintf(FINFO, "recv_files phase=%d\n", phase);
510 if (phase == 2 && delay_updates)
511 handle_delayed_updates(local_name);
512 send_msg(MSG_DONE, "", 0, 0);
516 if (ndx - cur_flist->ndx_start >= 0)
517 file = cur_flist->files[ndx - cur_flist->ndx_start];
519 file = dir_flist->files[cur_flist->parent_ndx];
520 fname = local_name ? local_name : f_name(file, fbuf);
522 if (DEBUG_GTE(RECV, 1))
523 rprintf(FINFO, "recv_files(%s)\n", fname);
525 #ifdef SUPPORT_XATTRS
526 if (iflags & ITEM_REPORT_XATTR && do_xfers)
527 recv_xattr_request(file, f_in);
530 if (!(iflags & ITEM_TRANSFER)) {
531 maybe_log_item(file, iflags, itemizing, xname);
532 #ifdef SUPPORT_XATTRS
533 if (preserve_xattrs && iflags & ITEM_REPORT_XATTR && do_xfers)
534 set_file_attrs(fname, file, NULL, fname, 0);
536 if (iflags & ITEM_IS_NEW) {
537 stats.created_files++;
538 if (S_ISREG(file->mode)) {
539 /* Nothing further to count. */
540 } else if (S_ISDIR(file->mode))
541 stats.created_dirs++;
543 else if (S_ISLNK(file->mode))
544 stats.created_symlinks++;
546 else if (IS_DEVICE(file->mode))
547 stats.created_devices++;
549 stats.created_specials++;
555 "got transfer request in phase 2 [%s]\n",
557 exit_cleanup(RERR_PROTOCOL);
560 if (file->flags & FLAG_FILE_SENT) {
561 if (csum_length == SHORT_SUM_LENGTH) {
562 if (keep_partial && !partial_dir)
563 make_backups = -make_backups; /* prevents double backup */
565 sparse_files = -sparse_files;
566 append_mode = -append_mode;
567 csum_length = SUM_LENGTH;
571 if (csum_length != SHORT_SUM_LENGTH) {
572 if (keep_partial && !partial_dir)
573 make_backups = -make_backups;
575 sparse_files = -sparse_files;
576 append_mode = -append_mode;
577 csum_length = SHORT_SUM_LENGTH;
580 if (iflags & ITEM_IS_NEW)
581 stats.created_files++;
584 if (!am_server && INFO_GTE(PROGRESS, 1))
585 set_current_file_index(file, ndx);
586 stats.xferred_files++;
587 stats.total_transferred_size += F_LENGTH(file);
589 cleanup_got_literal = 0;
591 if (daemon_filter_list.head
592 && check_filter(&daemon_filter_list, FLOG, fname, 0) < 0) {
593 rprintf(FERROR, "attempt to hack rsync failed.\n");
594 exit_cleanup(RERR_PROTOCOL);
600 : gen_wants_ndx(ndx, cur_flist->flist_num);
603 "(Skipping batched update for%s \"%s\")\n",
604 redoing ? " resend of" : "",
606 discard_receive_data(f_in, F_LENGTH(file));
607 file->flags |= FLAG_FILE_SENT;
612 if (!do_xfers) { /* log the transfer */
613 log_item(FCLIENT, file, &stats, iflags, NULL);
615 discard_receive_data(f_in, F_LENGTH(file));
618 if (write_batch < 0) {
619 log_item(FCLIENT, file, &stats, iflags, NULL);
621 discard_receive_data(f_in, F_LENGTH(file));
625 partialptr = partial_dir ? partial_dir_fname(fname) : fname;
627 if (protocol_version >= 29) {
628 switch (fnamecmp_type) {
632 case FNAMECMP_PARTIAL_DIR:
633 fnamecmp = partialptr;
635 case FNAMECMP_BACKUP:
636 fnamecmp = get_backup_name(fname);
640 pathjoin(fnamecmpbuf, MAXPATHLEN,
641 file->dirname, xname);
642 fnamecmp = fnamecmpbuf;
647 if (fnamecmp_type >= basis_dir_cnt) {
649 "invalid basis_dir index: %d.\n",
651 exit_cleanup(RERR_PROTOCOL);
653 pathjoin(fnamecmpbuf, sizeof fnamecmpbuf,
654 basis_dir[fnamecmp_type], fname);
655 fnamecmp = fnamecmpbuf;
658 if (!fnamecmp || (daemon_filter_list.head
659 && check_filter(&daemon_filter_list, FLOG, fname, 0) < 0)) {
661 fnamecmp_type = FNAMECMP_FNAME;
664 /* Reminder: --inplace && --partial-dir are never
665 * enabled at the same time. */
666 if (inplace && make_backups > 0) {
667 if (!(fnamecmp = get_backup_name(fname)))
670 fnamecmp_type = FNAMECMP_BACKUP;
671 } else if (partial_dir && partialptr)
672 fnamecmp = partialptr;
677 initial_stats = stats;
680 fd1 = do_open(fnamecmp, O_RDONLY, 0);
682 if (fd1 == -1 && protocol_version < 29) {
683 if (fnamecmp != fname) {
685 fd1 = do_open(fnamecmp, O_RDONLY, 0);
688 if (fd1 == -1 && basis_dir[0]) {
689 /* pre-29 allowed only one alternate basis */
690 pathjoin(fnamecmpbuf, sizeof fnamecmpbuf,
691 basis_dir[0], fname);
692 fnamecmp = fnamecmpbuf;
693 fd1 = do_open(fnamecmp, O_RDONLY, 0);
697 updating_basis_or_equiv = inplace
698 && (fnamecmp == fname || fnamecmp_type == FNAMECMP_BACKUP);
703 } else if (do_fstat(fd1,&st) != 0) {
704 rsyserr(FERROR_XFER, errno, "fstat %s failed",
705 full_fname(fnamecmp));
706 discard_receive_data(f_in, F_LENGTH(file));
709 send_msg_int(MSG_NO_SEND, ndx);
713 if (fd1 != -1 && S_ISDIR(st.st_mode) && fnamecmp == fname) {
714 /* this special handling for directories
715 * wouldn't be necessary if robust_rename()
716 * and the underlying robust_unlink could cope
719 rprintf(FERROR_XFER, "recv_files: %s is a directory\n",
720 full_fname(fnamecmp));
721 discard_receive_data(f_in, F_LENGTH(file));
724 send_msg_int(MSG_NO_SEND, ndx);
728 if (fd1 != -1 && !S_ISREG(st.st_mode)) {
733 /* If we're not preserving permissions, change the file-list's
734 * mode based on the local permissions and some heuristics. */
735 if (!preserve_perms) {
736 int exists = fd1 != -1;
738 const char *dn = file->dirname ? file->dirname : ".";
739 if (parent_dirname != dn
740 && strcmp(parent_dirname, dn) != 0) {
741 dflt_perms = default_perms_for_dir(dn);
745 file->mode = dest_mode(file->mode, st.st_mode,
749 /* We now check to see if we are writing the file "inplace" */
751 fd2 = do_open(fname, O_WRONLY|O_CREAT, 0600);
753 rsyserr(FERROR_XFER, errno, "open %s failed",
757 fd2 = open_tmpfile(fnametmp, fname, file);
759 cleanup_set(fnametmp, partialptr, file, fd1, fd2);
763 discard_receive_data(f_in, F_LENGTH(file));
767 send_msg_int(MSG_NO_SEND, ndx);
771 /* log the transfer */
772 if (log_before_transfer)
773 log_item(FCLIENT, file, &initial_stats, iflags, NULL);
774 else if (!am_server && INFO_GTE(NAME, 1) && INFO_EQ(PROGRESS, 1))
775 rprintf(FINFO, "%s\n", fname);
778 recv_ok = receive_data(f_in, fnamecmp, fd1, st.st_size,
779 fname, fd2, F_LENGTH(file));
781 log_item(log_code, file, &initial_stats, iflags, NULL);
785 if (close(fd2) < 0) {
786 rsyserr(FERROR, errno, "close failed on %s",
787 full_fname(fnametmp));
788 exit_cleanup(RERR_FILEIO);
791 if ((recv_ok && (!delay_updates || !partialptr)) || inplace) {
792 if (partialptr == fname)
794 if (!finish_transfer(fname, fnametmp, fnamecmp,
795 partialptr, file, recv_ok, 1))
797 else if (fnamecmp == partialptr) {
798 do_unlink(partialptr);
799 handle_partial_dir(partialptr, PDIR_DELETE);
801 } else if (keep_partial && partialptr) {
802 if (!handle_partial_dir(partialptr, PDIR_CREATE)) {
804 "Unable to create partial-dir for %s -- discarding %s.\n",
805 local_name ? local_name : f_name(file, NULL),
806 recv_ok ? "completed file" : "partial file");
809 } else if (!finish_transfer(partialptr, fnametmp, fnamecmp, NULL,
810 file, recv_ok, !partial_dir))
812 else if (delay_updates && recv_ok) {
813 bitbag_set_bit(delayed_bits, ndx);
823 file->flags |= FLAG_FILE_SENT;
829 if (remove_source_files || inc_recurse
830 || (preserve_hard_links && F_IS_HLINKED(file)))
831 send_msg_int(MSG_SUCCESS, ndx);
834 enum logcode msgtype = redoing ? FERROR_XFER : FWARNING;
835 if (msgtype == FERROR_XFER || INFO_GTE(NAME, 1)) {
836 char *errstr, *redostr, *keptstr;
837 if (!(keep_partial && partialptr) && !inplace)
838 keptstr = "discarded";
839 else if (partial_dir)
840 keptstr = "put into partial-dir";
842 keptstr = "retained";
843 if (msgtype == FERROR_XFER) {
848 redostr = read_batch ? " (may try again)"
849 : " (will try again)";
852 "%s: %s failed verification -- update %s%s.\n",
853 errstr, local_name ? f_name(file, NULL) : fname,
858 flist_ndx_push(&batch_redo_list, ndx);
859 send_msg_int(MSG_REDO, ndx);
860 file->flags |= FLAG_FILE_SENT;
861 } else if (inc_recurse)
862 send_msg_int(MSG_NO_SEND, ndx);
867 send_msg_int(MSG_NO_SEND, ndx);
871 if (make_backups < 0)
872 make_backups = -make_backups;
874 if (phase == 2 && delay_updates) /* for protocol_version < 29 */
875 handle_delayed_updates(local_name);
877 if (DEBUG_GTE(RECV, 1))
878 rprintf(FINFO,"recv_files finished\n");