From 7f2a1f651e6db7483bcb3d2678dcb60cc4e54582 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Fri, 25 Feb 2005 17:08:31 +0000 Subject: Got rid of kluged value for am_sender, and instead added a new variable named am_starting_up that is non-zero during the option parsing. This lets the who_am_i() routine output a better value for debugging info that is output during the option parsing. --- options.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'options.c') diff --git a/options.c b/options.c index 4287fd5f..dbf50128 100644 --- a/options.c +++ b/options.c @@ -65,15 +65,16 @@ int protocol_version = PROTOCOL_VERSION; int sparse_files = 0; int do_compression = 0; int am_root = 0; +int am_server = 0; +int am_sender = 0; +int am_generator = 0; +int am_starting_up = 1; int orig_umask = 0; int relative_paths = -1; int implied_dirs = 1; int numeric_ids = 0; int force_delete = 0; int io_timeout = 0; -int am_server = 0; -int am_sender = -1; -int am_generator = 0; char *files_from = NULL; int filesfrom_fd = -1; char *remote_filesfrom_file = NULL; @@ -695,6 +696,7 @@ int parse_arguments(int *argc, const char ***argv, int frommain) } *argv = poptGetArgs(pc); *argc = count_args(*argv); + am_starting_up = 0; daemon_opt = 0; am_daemon = 1; return 1; @@ -867,9 +869,6 @@ int parse_arguments(int *argc, const char ***argv, int frommain) } } - if (am_sender < 0) - am_sender = 0; - #ifndef SUPPORT_LINKS if (preserve_links && !am_sender) { snprintf(err_buf, sizeof err_buf, @@ -1194,6 +1193,8 @@ int parse_arguments(int *argc, const char ***argv, int frommain) } } + am_starting_up = 0; + return 1; } -- cgit v1.2.3