Add --no-whole-file and --no-blocking-io options
[rsync/rsync.git] / main.c
diff --git a/main.c b/main.c
index fd30211..fa5ecc0 100644 (file)
--- a/main.c
+++ b/main.c
@@ -60,6 +60,7 @@ static void report(int f)
        if (do_stats) {
                /* These come out from every process */
                show_malloc_stats();
+               show_flist_stats();
        }
 
        if (am_daemon) {
@@ -206,10 +207,11 @@ static pid_t do_cmd(char *cmd,char *machine,char *user,char *path,int *f_in,int
 
                args[argc++] = rsync_path;
 
-               server_options(args,&argc);
+               if ((blocking_io == -1) && (strcmp(cmd, RSYNC_RSH) == 0))
+                       blocking_io = 1;
 
+               server_options(args,&argc);
 
-               if (strcmp(cmd, RSYNC_RSH) == 0) blocking_io = 1;
        }
 
        args[argc++] = ".";
@@ -710,7 +712,8 @@ static int start_client(int argc, char *argv[])
                if (!p) {
                        local_server = 1;
                        /* disable "rsync algorithm" when both sides local */
-                       whole_file = 1;
+                       if (whole_file == -1)
+                               whole_file = 1;
                } else if (p[1] == ':') {
                        *p = 0;
                        return start_socket_client(argv[argc-1], p+2, argc-1, argv);