Added solaris IPv6 checking to configure. Fixes #6438.
[rsync/rsync.git] / main.c
diff --git a/main.c b/main.c
index 2ef2f47..8c2307a 100644 (file)
--- a/main.c
+++ b/main.c
@@ -77,10 +77,12 @@ extern char *rsync_path;
 extern char *shell_cmd;
 extern char *batch_name;
 extern char *password_file;
+extern char *backup_dir;
 extern char curr_dir[MAXPATHLEN];
+extern char backup_dir_buf[MAXPATHLEN];
 extern char *basis_dir[MAX_BASIS_DIRS+1];
 extern struct file_list *first_flist;
-extern struct filter_list_struct daemon_filter_list;
+extern filter_rule_list daemon_filter_list;
 
 uid_t our_uid;
 int am_generator = 0;
@@ -817,6 +819,16 @@ static int do_recv(int f_in, int f_out, char *local_name)
                exit_cleanup(RERR_IPC);
        }
 
+       if (backup_dir) {
+               int ret = make_path(backup_dir_buf, MKP_DROP_NAME); /* drops trailing slash */
+               if (ret < 0)
+                       exit_cleanup(RERR_SYNTAX);
+               if (ret)
+                       rprintf(FINFO, "Created backup_dir %s\n", backup_dir_buf);
+               else if (INFO_GTE(BACKUP, 1))
+                       rprintf(FINFO, "backup_dir is %s\n", backup_dir_buf);
+       }
+
        io_flush(NORMAL_FLUSH);
 
        if ((pid = do_fork()) == -1) {
@@ -988,7 +1000,7 @@ static void do_server_recv(int f_in, int f_out, int argc, char *argv[])
 
        if (daemon_filter_list.head) {
                char **dir_p;
-               struct filter_list_struct *elp = &daemon_filter_list;
+               filter_rule_list *elp = &daemon_filter_list;
 
                for (dir_p = basis_dir; *dir_p; dir_p++) {
                        char *dir = *dir_p;