summaryrefslogtreecommitdiff
path: root/options.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2005-02-25 17:08:31 +0000
committerWayne Davison <wayned@samba.org>2005-02-25 17:08:31 +0000
commit7f2a1f651e6db7483bcb3d2678dcb60cc4e54582 (patch)
treef04f813065abaf72f9794d1e0792d659e352c162 /options.c
parentbbbb44ee0f9cb07beaeaea4b9467d50b90cbf5cc (diff)
downloadrsync-7f2a1f651e6db7483bcb3d2678dcb60cc4e54582.tar.gz
rsync-7f2a1f651e6db7483bcb3d2678dcb60cc4e54582.tar.bz2
rsync-7f2a1f651e6db7483bcb3d2678dcb60cc4e54582.zip
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.
Diffstat (limited to 'options.c')
-rw-r--r--options.c13
1 files changed, 7 insertions, 6 deletions
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;
}