Add support for transferring & setting nsec time values.
[rsync/rsync.git] / sender.c
index cc2c9e9..e3a896a 100644 (file)
--- a/sender.c
+++ b/sender.c
@@ -172,6 +172,7 @@ void send_files(int f_in, int f_out)
        int itemizing = am_server ? logfile_format_has_i : stdout_format_has_i;
        enum logcode log_code = log_before_transfer ? FLOG : FINFO;
        int f_xfer = write_batch < 0 ? batch_fd : f_out;
+       int save_io_error = io_error;
        int ndx, j;
 
        if (DEBUG_GTE(SEND, 1))
@@ -179,7 +180,7 @@ void send_files(int f_in, int f_out)
 
        while (1) {
                if (inc_recurse)
-                       send_extra_file_list(f_out, FILECNT_LOOKAHEAD);
+                       send_extra_file_list(f_out, MIN_FILECNT_LOOKAHEAD);
 
                /* This call also sets cur_flist. */
                ndx = read_ndx_and_attrs(f_in, &iflags, &fnamecmp_type,
@@ -205,7 +206,7 @@ void send_files(int f_in, int f_out)
                }
 
                if (inc_recurse)
-                       send_extra_file_list(f_out, FILECNT_LOOKAHEAD);
+                       send_extra_file_list(f_out, MIN_FILECNT_LOOKAHEAD);
 
                if (ndx - cur_flist->ndx_start >= 0)
                        file = cur_flist->files[ndx - cur_flist->ndx_start];
@@ -381,6 +382,9 @@ void send_files(int f_in, int f_out)
        if (make_backups < 0)
                make_backups = -make_backups;
 
+       if (io_error != save_io_error && protocol_version >= 30)
+               send_msg_int(MSG_IO_ERROR, io_error);
+
        if (DEBUG_GTE(SEND, 1))
                rprintf(FINFO, "send files finished\n");