Remove duplication for -x option.
[rsync/rsync.git] / rsync.c
diff --git a/rsync.c b/rsync.c
index 31f9696..c9be424 100644 (file)
--- a/rsync.c
+++ b/rsync.c
@@ -365,11 +365,10 @@ int read_ndx_and_attrs(int f_in, int f_out, int *iflag_ptr, uchar *type_ptr,
        iflags = protocol_version >= 29 ? read_shortint(f_in)
                   : ITEM_TRANSFER | ITEM_MISSING_DATA;
 
-       /* Honor the old-style keep-alive indicator. */
-       if (protocol_version < 30
-        && ndx == cur_flist->used && iflags == ITEM_IS_NEW) {
+       /* Support the protocol-29 keep-alive style. */
+       if (protocol_version < 30 && ndx == cur_flist->used && iflags == ITEM_IS_NEW) {
                if (am_sender)
-                       maybe_send_keepalive();
+                       maybe_send_keepalive(time(NULL), MSK_ALLOW_FLUSH);
                goto read_loop;
        }
 
@@ -645,15 +644,13 @@ int finish_transfer(const char *fname, const char *fnametmp,
        /* move tmp file over real file */
        if (DEBUG_GTE(RECV, 1))
                rprintf(FINFO, "renaming %s to %s\n", fnametmp, fname);
-       ret = robust_rename(fnametmp, fname, temp_copy_name,
-                           file->mode & INITACCESSPERMS);
+       ret = robust_rename(fnametmp, fname, temp_copy_name, file->mode);
        if (ret < 0) {
                rsyserr(FERROR_XFER, errno, "%s %s -> \"%s\"",
                        ret == -2 ? "copy" : "rename",
                        full_fname(fnametmp), fname);
                if (!partialptr || (ret == -2 && temp_copy_name)
-                || robust_rename(fnametmp, partialptr, NULL,
-                                 file->mode & INITACCESSPERMS) < 0)
+                || robust_rename(fnametmp, partialptr, NULL, file->mode) < 0)
                        do_unlink(fnametmp);
                return 0;
        }