Lets use varchar(128) instead of 256.
[rsync-patches.git] / slow-down.diff
index e035e2f47a8d4e0478e1272e175602601f982f98..e39a8a6e4bb8521d23a08dec016769bf0974ad75 100644 (file)
@@ -14,29 +14,32 @@ To use this patch, run these commands for a successful build:
     ./configure                           (optional if already run)
     make
 
---- old/flist.c
-+++ new/flist.c
-@@ -62,6 +62,7 @@ extern int copy_links;
- extern int copy_unsafe_links;
- extern int protocol_version;
- extern int sanitize_paths;
+based-on: 1e9ee19a716b72454dfeab663802c626b81cdf2e
+diff --git a/flist.c b/flist.c
+--- a/flist.c
++++ b/flist.c
+@@ -69,6 +69,7 @@ extern int sender_symlink_iconv;
+ extern int output_needs_newline;
+ extern int sender_keeps_checksum;
+ extern int unsort_ndx;
 +extern unsigned long sleep_asec;
+ extern uid_t our_uid;
  extern struct stats stats;
- extern char curr_dir[MAXPATHLEN];
-@@ -1463,6 +1464,9 @@ static void send_directory(int f, struct
+ extern char *filesfrom_host;
+@@ -1752,6 +1753,9 @@ static void send_directory(int f, struct file_list *flist, char *fbuf, int len,
                }
  
-               send_file_name(f, flist, fbuf, NULL, flags, filter_flags);
+               send_file_name(f, flist, fbuf, NULL, flags, filter_level);
 +              /* Sleep for a bit, to avoid hammering the disk. */
 +              if (sleep_asec)
 +                      usleep(sleep_asec);
        }
  
        fbuf[len] = '\0';
---- old/options.c
-+++ new/options.c
-@@ -105,6 +105,7 @@ int size_only = 0;
+diff --git a/options.c b/options.c
+--- a/options.c
++++ b/options.c
+@@ -109,6 +109,7 @@ int size_only = 0;
  int daemon_bwlimit = 0;
  int bwlimit = 0;
  int fuzzy_basis = 0;
@@ -44,19 +47,19 @@ To use this patch, run these commands for a successful build:
  size_t bwlimit_writemax = 0;
  int ignore_existing = 0;
  int ignore_non_existing = 0;
-@@ -405,6 +406,7 @@ void usage(enum logcode F)
+@@ -792,6 +793,7 @@ void usage(enum logcode F)
    rprintf(F,"     --password-file=FILE    read daemon-access password from FILE\n");
    rprintf(F,"     --list-only             list the files instead of copying them\n");
-   rprintf(F,"     --bwlimit=KBPS          limit I/O bandwidth; KBytes per second\n");
+   rprintf(F,"     --bwlimit=RATE          limit socket I/O bandwidth\n");
 +  rprintf(F,"     --slow-down=USECs       sleep N usec while creating the filelist\n");
-   rprintf(F,"     --write-batch=FILE      write a batched update to FILE\n");
-   rprintf(F,"     --only-write-batch=FILE like --write-batch but w/o updating destination\n");
-   rprintf(F,"     --read-batch=FILE       read a batched update from FILE\n");
-@@ -567,6 +569,7 @@ static struct poptOption long_options[] 
+ #ifdef HAVE_SETVBUF
+   rprintf(F,"     --outbuf=N|L|B          set output buffering to None, Line, or Block\n");
+ #endif
+@@ -987,6 +989,7 @@ static struct poptOption long_options[] = {
    {"itemize-changes", 'i', POPT_ARG_NONE,   0, 'i', 0, 0 },
    {"no-itemize-changes",0, POPT_ARG_VAL,    &itemize_changes, 0, 0, 0 },
    {"no-i",             0,  POPT_ARG_VAL,    &itemize_changes, 0, 0, 0 },
 +  {"slow-down",        0,  POPT_ARG_LONG,   &sleep_asec, 0, 0, 0 },
-   {"bwlimit",          0,  POPT_ARG_INT,    &bwlimit, 0, 0, 0 },
+   {"bwlimit",          0,  POPT_ARG_STRING, &bwlimit_arg, OPT_BWLIMIT, 0, 0 },
    {"no-bwlimit",       0,  POPT_ARG_VAL,    &bwlimit, 0, 0, 0 },
    {"backup",          'b', POPT_ARG_VAL,    &make_backups, 1, 0, 0 },