From 3c74c3a35873faf2308efe93eeb361c693026bd2 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Thu, 27 May 2004 21:51:53 +0000 Subject: [PATCH] Set a new variable, bwlimit_writemax, based on the value of the bwlimit option. --- options.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/options.c b/options.c index ecd8ac38..69eac5c7 100644 --- a/options.c +++ b/options.c @@ -83,6 +83,7 @@ int safe_symlinks = 0; int copy_unsafe_links = 0; int size_only = 0; int bwlimit = 0; +size_t bwlimit_writemax = 0; int delete_after = 0; int only_existing = 0; int opt_ignore_existing = 0; @@ -728,6 +729,12 @@ int parse_arguments(int *argc, const char ***argv, int frommain) if (do_progress && !verbose) verbose = 1; + if (bwlimit) { + bwlimit_writemax = (size_t)bwlimit * 128; + if (bwlimit_writemax < 512) + bwlimit_writemax = 512; + } + if (files_from) { char *colon; if (*argc != 2 && !(am_server && am_sender && *argc == 1)) { -- 2.34.1