mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-03-02 05:18:50 -05:00
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.
This commit is contained in:
13
options.c
13
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user