Output a -vvv(erbose) message when receiving an incremental file list.
authorWayne Davison <wayned@samba.org>
Wed, 23 May 2007 00:42:32 +0000 (00:42 +0000)
committerWayne Davison <wayned@samba.org>
Wed, 23 May 2007 00:42:32 +0000 (00:42 +0000)
flist.c
io.c
rsync.c

diff --git a/flist.c b/flist.c
index d7f78f1..3982662 100644 (file)
--- a/flist.c
+++ b/flist.c
@@ -1954,7 +1954,7 @@ struct file_list *recv_file_list(int f)
 #endif
        {
                flist->sorted = flist->files;
 #endif
        {
                flist->sorted = flist->files;
-               if (inc_recurse) {
+               if (inc_recurse && dir_flist->count > dstart) {
                        dir_flist->sorted = dir_flist->files;
                        qsort(dir_flist->sorted + dstart, dir_flist->count - dstart,
                              sizeof (struct file_struct*), (int (*)())file_compare);
                        dir_flist->sorted = dir_flist->files;
                        qsort(dir_flist->sorted + dstart, dir_flist->count - dstart,
                              sizeof (struct file_struct*), (int (*)())file_compare);
@@ -2011,6 +2011,10 @@ void recv_additional_file_list(int f)
                                NDX_FLIST_OFFSET - dir_flist->count + 1);
                        exit_cleanup(RERR_PROTOCOL);
                }
                                NDX_FLIST_OFFSET - dir_flist->count + 1);
                        exit_cleanup(RERR_PROTOCOL);
                }
+               if (verbose > 3) {
+                       rprintf(FINFO, "[%s] receiving flist for dir %d\n",
+                               who_am_i(), ndx);
+               }
                flist = recv_file_list(f);
                flist->parent_ndx = ndx;
        }
                flist = recv_file_list(f);
                flist->parent_ndx = ndx;
        }
diff --git a/io.c b/io.c
index 1c85880..897efc2 100644 (file)
--- a/io.c
+++ b/io.c
@@ -340,6 +340,10 @@ static void read_msg_fd(void)
                /* Read extra file list from receiver. */
                assert(iobuf_in != NULL);
                assert(iobuf_f_in == fd);
                /* Read extra file list from receiver. */
                assert(iobuf_in != NULL);
                assert(iobuf_f_in == fd);
+               if (verbose > 3) {
+                       rprintf(FINFO, "[%s] receiving flist for dir %d\n",
+                               who_am_i(), IVAL(buf,0));
+               }
                flist = recv_file_list(fd);
                flist->parent_ndx = IVAL(buf,0);
                break;
                flist = recv_file_list(fd);
                flist->parent_ndx = IVAL(buf,0);
                break;
diff --git a/rsync.c b/rsync.c
index 30c93ae..292e518 100644 (file)
--- a/rsync.c
+++ b/rsync.c
@@ -175,6 +175,10 @@ int read_ndx_and_attrs(int f_in, int *iflag_ptr, uchar *type_ptr,
                /* Send everything read from f_in to msg_fd_out. */
                send_msg_int(MSG_FLIST, ndx);
                start_flist_forward(f_in);
                /* Send everything read from f_in to msg_fd_out. */
                send_msg_int(MSG_FLIST, ndx);
                start_flist_forward(f_in);
+               if (verbose > 3) {
+                       rprintf(FINFO, "[%s] receiving flist for dir %d\n",
+                               who_am_i(), ndx);
+               }
                flist = recv_file_list(f_in);
                flist->parent_ndx = ndx;
                stop_flist_forward();
                flist = recv_file_list(f_in);
                flist->parent_ndx = ndx;
                stop_flist_forward();