if (f == -1 || !am_sender)
return;
}
---- orig/receiver.c 2005-03-16 02:19:30
+--- orig/receiver.c 2005-03-24 16:41:46
+++ receiver.c 2005-03-05 00:31:00
-@@ -618,6 +618,9 @@ int recv_files(int f_in, struct file_lis
+@@ -620,6 +620,9 @@ int recv_files(int f_in, struct file_lis
if (!log_before_transfer)
log_item(file, &initial_stats, iflags, NULL);
next;
}
---- orig/options.c 2005-03-17 09:05:21
+--- orig/options.c 2005-03-24 16:41:46
+++ options.c 2005-02-14 02:46:05
@@ -44,6 +44,7 @@ int keep_dirlinks = 0;
int copy_links = 0;
default:
/* A large opt value means that set_refuse_options()
* turned this option off. */
-@@ -1269,6 +1295,8 @@ void server_options(char **args,int *arg
+@@ -1264,6 +1290,8 @@ void server_options(char **args,int *arg
if (preserve_hard_links)
argstr[x++] = 'H';
matched(f, s, buf, j, -2);
matched(f, s, buf, len, -1);
}
---- orig/options.c 2005-03-17 09:05:21
+--- orig/options.c 2005-03-24 16:41:46
+++ options.c 2005-03-11 11:21:34
@@ -39,6 +39,7 @@ int make_backups = 0;
**/
break;
}
if (!is_wild)
-@@ -1113,6 +1119,14 @@ int parse_arguments(int *argc, const cha
+@@ -1108,6 +1114,14 @@ int parse_arguments(int *argc, const cha
bwlimit_writemax = 512;
}
if (delay_updates && !partial_dir)
partial_dir = partialdir_for_delayupdate;
-@@ -1423,7 +1437,9 @@ void server_options(char **args,int *arg
+@@ -1418,7 +1432,9 @@ void server_options(char **args,int *arg
if (opt_ignore_existing && am_sender)
args[ac++] = "--ignore-existing";
args[ac++] = "--inplace";
if (tmpdir) {
---- orig/receiver.c 2005-03-16 02:19:30
+--- orig/receiver.c 2005-03-24 16:41:46
+++ receiver.c 2005-02-11 20:26:32
@@ -44,6 +44,7 @@ extern int remove_sent_files;
extern int module_id;
make proto
---- orig/batch.c 2005-03-16 02:19:29
+--- orig/batch.c 2005-03-27 05:13:14
+++ batch.c 2004-07-03 20:15:41
-@@ -197,6 +197,8 @@ void show_flist(int index, struct file_s
+@@ -207,6 +207,8 @@ void show_flist(int index, struct file_s
rprintf(FINFO, "flist->flags=%#x\n", fptr[i]->flags);
rprintf(FINFO, "flist->modtime=%#lx\n",
(long unsigned) fptr[i]->modtime);
if (verbose > 1)
rprintf(FINFO, "%s is newer\n", safe_fname(fname));
return;
---- orig/options.c 2005-03-17 09:05:21
+--- orig/options.c 2005-03-24 16:41:46
+++ options.c 2005-02-21 10:53:28
@@ -50,6 +50,7 @@ int preserve_uid = 0;
int preserve_gid = 0;
{"checksum", 'c', POPT_ARG_NONE, &always_checksum, 0, 0, 0 },
{"verbose", 'v', POPT_ARG_NONE, 0, 'v', 0, 0 },
{"quiet", 'q', POPT_ARG_NONE, 0, 'q', 0, 0 },
-@@ -1277,6 +1280,8 @@ void server_options(char **args,int *arg
+@@ -1272,6 +1275,8 @@ void server_options(char **args,int *arg
argstr[x++] = 'D';
if (preserve_times)
argstr[x++] = 't';
else
ok = do_rmdir(fname) == 0;
if (ok) {
---- orig/options.c 2005-03-17 09:05:21
+--- orig/options.c 2005-03-24 16:41:46
+++ options.c 2005-03-01 01:25:39
@@ -127,10 +127,14 @@ int no_detach
int write_batch = 0;
{"hard-links", 'H', POPT_ARG_NONE, &preserve_hard_links, 0, 0, 0 },
{"read-batch", 0, POPT_ARG_STRING, &batch_name, OPT_READ_BATCH, 0, 0 },
{"write-batch", 0, POPT_ARG_STRING, &batch_name, OPT_WRITE_BATCH, 0, 0 },
-@@ -1012,6 +1022,8 @@ int parse_arguments(int *argc, const cha
+@@ -1007,6 +1017,8 @@ int parse_arguments(int *argc, const cha
partial_dir = sanitize_path(NULL, partial_dir, NULL, 0);
if (backup_dir)
backup_dir = sanitize_path(NULL, backup_dir, NULL, 0);
}
if (server_filter_list.head && !am_sender) {
struct filter_list_struct *elp = &server_filter_list;
-@@ -1046,6 +1058,14 @@ int parse_arguments(int *argc, const cha
+@@ -1041,6 +1053,14 @@ int parse_arguments(int *argc, const cha
return 0;
}
}
}
if (!backup_suffix)
-@@ -1057,6 +1077,16 @@ int parse_arguments(int *argc, const cha
+@@ -1052,6 +1072,16 @@ int parse_arguments(int *argc, const cha
backup_suffix);
return 0;
}
if (backup_dir) {
backup_dir_len = strlcpy(backup_dir_buf, backup_dir, sizeof backup_dir_buf);
backup_dir_remainder = sizeof backup_dir_buf - backup_dir_len;
-@@ -1078,6 +1108,31 @@ int parse_arguments(int *argc, const cha
+@@ -1073,6 +1103,31 @@ int parse_arguments(int *argc, const cha
"--suffix cannot be a null string without --backup-dir\n");
return 0;
}
if (make_backups && !backup_dir)
omit_dir_times = 1;
-@@ -1356,6 +1411,10 @@ void server_options(char **args,int *arg
+@@ -1351,6 +1406,10 @@ void server_options(char **args,int *arg
args[ac++] = "--backup-dir";
args[ac++] = backup_dir;
}
/* Only send --suffix if it specifies a non-default value. */
if (strcmp(backup_suffix, backup_dir ? "" : BACKUP_SUFFIX) != 0) {
-@@ -1364,7 +1423,13 @@ void server_options(char **args,int *arg
+@@ -1359,7 +1418,13 @@ void server_options(char **args,int *arg
goto oom;
args[ac++] = arg;
}
file->uid = st.st_uid;
file->gid = st.st_gid;
---- orig/options.c 2005-03-17 09:05:21
+--- orig/options.c 2005-03-24 16:41:46
+++ options.c 2005-03-01 01:26:56
@@ -140,6 +140,7 @@ char *log_format = NULL;
char *password_file = NULL;
{"devices", 'D', POPT_ARG_NONE, &preserve_devices, 0, 0, 0 },
{"times", 't', POPT_ARG_NONE, &preserve_times, 0, 0, 0 },
{"omit-dir-times", 'O', POPT_ARG_VAL, &omit_dir_times, 2, 0, 0 },
-@@ -1081,6 +1086,13 @@ int parse_arguments(int *argc, const cha
+@@ -1076,6 +1081,13 @@ int parse_arguments(int *argc, const cha
if (make_backups && !backup_dir)
omit_dir_times = 1;
if (log_format) {
if (strstr(log_format, "%i") != NULL)
log_format_has_i = 1;
-@@ -1443,6 +1455,11 @@ void server_options(char **args,int *arg
+@@ -1438,6 +1450,11 @@ void server_options(char **args,int *arg
}
}
if (st->st_size != file->length)
return 0;
---- orig/options.c 2005-03-17 09:05:21
+--- orig/options.c 2005-03-24 16:41:46
+++ options.c 2005-01-28 19:14:15
@@ -89,6 +89,7 @@ int keep_partial = 0;
int safe_symlinks = 0;
{"modify-window", 0, POPT_ARG_INT, &modify_window, OPT_MODIFY_WINDOW, 0, 0 },
{"one-file-system", 'x', POPT_ARG_NONE, &one_file_system, 0, 0, 0 },
{"existing", 0, POPT_ARG_NONE, &only_existing, 0, 0, 0 },
-@@ -1383,6 +1386,9 @@ void server_options(char **args,int *arg
+@@ -1378,6 +1381,9 @@ void server_options(char **args,int *arg
if (size_only)
args[ac++] = "--size-only";
if (dir)
free(dir);
---- orig/options.c 2005-03-17 09:05:21
+--- orig/options.c 2005-03-24 16:41:46
+++ options.c 2005-02-14 02:50:32
@@ -137,6 +137,7 @@ char *basis_dir[MAX_BASIS_DIRS+1];
char *config_file = NULL;
This patch from Sami Farin lets you specify --fsync if you want fsync()
to be called on every file we write.
---- orig/options.c 2005-03-17 09:05:21
+--- orig/options.c 2005-03-24 16:41:46
+++ options.c 2005-01-28 19:30:47
@@ -39,6 +39,7 @@ int make_backups = 0;
**/
{"dry-run", 'n', POPT_ARG_NONE, &dry_run, 0, 0, 0 },
{"sparse", 'S', POPT_ARG_NONE, &sparse_files, 0, 0, 0 },
{"cvs-exclude", 'C', POPT_ARG_NONE, &cvs_exclude, 0, 0, 0 },
-@@ -1431,6 +1434,9 @@ void server_options(char **args,int *arg
+@@ -1426,6 +1429,9 @@ void server_options(char **args,int *arg
args[ac++] = tmpdir;
}
if (basis_dir[0] && am_sender) {
/* the server only needs this option if it is not the sender,
* and it may be an older version that doesn't know this
---- orig/receiver.c 2005-03-16 02:19:30
+--- orig/receiver.c 2005-03-24 16:41:46
+++ receiver.c 2005-02-20 00:17:37
@@ -37,6 +37,7 @@ extern int keep_dirlinks;
extern int preserve_hard_links;
case '?':
/* Match anything but '/'. */
if (*text == '/')
---- orig/options.c 2005-03-17 09:05:21
+--- orig/options.c 2005-03-24 16:41:46
+++ options.c 2004-10-14 17:22:51
@@ -100,6 +100,7 @@ int max_delete = 0;
OFF_T max_size = 0;
{"safe-links", 0, POPT_ARG_NONE, &safe_symlinks, 0, 0, 0 },
{"help", 'h', POPT_ARG_NONE, 0, 'h', 0, 0 },
{"backup", 'b', POPT_ARG_NONE, &make_backups, 0, 0, 0 },
-@@ -1395,6 +1398,9 @@ void server_options(char **args,int *arg
+@@ -1390,6 +1393,9 @@ void server_options(char **args,int *arg
args[ac++] = arg;
}
+}
+
+#endif
---- orig/options.c 2005-03-17 09:05:21
+--- orig/options.c 2005-03-24 16:41:46
+++ options.c 2005-03-01 01:27:55
@@ -140,6 +140,7 @@ char *log_format = NULL;
char *password_file = NULL;
default:
/* A large opt value means that set_refuse_options()
* turned this option off. */
-@@ -1443,6 +1461,11 @@ void server_options(char **args,int *arg
+@@ -1438,6 +1456,11 @@ void server_options(char **args,int *arg
}
}
if (files_from && (!am_sender || filesfrom_host)) {
if (filesfrom_host) {
args[ac++] = "--files-from";
---- orig/receiver.c 2005-03-16 02:19:30
+--- orig/receiver.c 2005-03-24 16:41:46
+++ receiver.c 2005-01-15 21:29:13
@@ -51,6 +51,7 @@ extern int delay_updates;
extern struct stats stats;
}
static void handle_delayed_updates(struct file_list *flist, char *local_name)
-@@ -613,8 +624,12 @@ int recv_files(int f_in, struct file_lis
+@@ -615,8 +626,12 @@ int recv_files(int f_in, struct file_lis
rprintf(FINFO, "%s\n", safe_fname(fname));
/* recv file data */
#else
linkname_len = 0;
#endif
---- orig/options.c 2005-03-17 09:05:21
+--- orig/options.c 2005-03-24 16:41:46
+++ options.c 2005-01-28 19:33:24
@@ -43,6 +43,7 @@ int archive_mode = 0;
int keep_dirlinks = 0;
AC_MSG_CHECKING([whether to call shutdown on all sockets])
case $host_os in
*cygwin* ) AC_MSG_RESULT(yes)
---- orig/options.c 2005-03-17 09:05:21
+--- orig/options.c 2005-03-24 16:41:46
+++ options.c 2005-03-01 01:34:42
@@ -157,6 +157,14 @@ int log_format_has_o_or_i = 0;
int always_checksum = 0;
default:
/* A large opt value means that set_refuse_options()
* turned this option off. */
-@@ -1116,6 +1149,17 @@ int parse_arguments(int *argc, const cha
+@@ -1111,6 +1144,17 @@ int parse_arguments(int *argc, const cha
if (delay_updates && !partial_dir)
partial_dir = partialdir_for_delayupdate;
if (inplace) {
#ifdef HAVE_FTRUNCATE
if (partial_dir) {
-@@ -1483,11 +1527,28 @@ char *check_for_hostspec(char *s, char *
+@@ -1478,11 +1522,28 @@ char *check_for_hostspec(char *s, char *
{
char *p;
int not_host;
+ preserve_gid = 2;
+ }
}
---- orig/options.c 2005-03-17 09:05:21
+--- orig/options.c 2005-03-24 16:41:46
+++ options.c 2004-09-09 01:59:08
@@ -404,8 +404,8 @@ static struct poptOption long_options[]
{"no-whole-file", 0, POPT_ARG_VAL, &whole_file, 0, 0, 0 },
case 'v':
verbose++;
break;
-@@ -954,8 +962,8 @@ int parse_arguments(int *argc, const cha
+@@ -949,8 +957,8 @@ int parse_arguments(int *argc, const cha
#endif
preserve_perms = 1;
preserve_times = 1;
preserve_devices = 1;
}
-@@ -1269,10 +1277,16 @@ void server_options(char **args,int *arg
+@@ -1264,10 +1272,16 @@ void server_options(char **args,int *arg
if (preserve_hard_links)
argstr[x++] = 'H';
while (1) {
struct file_struct *file;
---- orig/options.c 2005-03-17 09:05:21
+--- orig/options.c 2005-03-24 16:41:46
+++ options.c 2005-03-01 01:37:22
@@ -81,6 +81,7 @@ char *filesfrom_host = NULL;
int eol_nulls = 0;
{"rsh", 'e', POPT_ARG_STRING, &shell_cmd, 0, 0, 0 },
{"block-size", 'B', POPT_ARG_LONG, &block_size, 0, 0, 0 },
{"max-delete", 0, POPT_ARG_INT, &max_delete, 0, 0, 0 },
-@@ -918,6 +921,11 @@ int parse_arguments(int *argc, const cha
- batch_name = NULL;
- }
+@@ -913,6 +916,11 @@ int parse_arguments(int *argc, const cha
+ } else if (dry_run)
+ write_batch = 0;
}
+ if (source_cd && files_from) {
+ snprintf(err_buf, sizeof err_buf,
if (read_batch && files_from) {
snprintf(err_buf, sizeof err_buf,
"--read-batch cannot be used with --files-from\n");
-@@ -1012,6 +1020,14 @@ int parse_arguments(int *argc, const cha
+@@ -1007,6 +1015,14 @@ int parse_arguments(int *argc, const cha
partial_dir = sanitize_path(NULL, partial_dir, NULL, 0);
if (backup_dir)
backup_dir = sanitize_path(NULL, backup_dir, NULL, 0);
}
if (server_filter_list.head && !am_sender) {
struct filter_list_struct *elp = &server_filter_list;
-@@ -1405,6 +1421,11 @@ void server_options(char **args,int *arg
+@@ -1400,6 +1416,11 @@ void server_options(char **args,int *arg
} else if (keep_partial)
args[ac++] = "--partial";
if (t - last_io >= io_timeout) {
if (!am_server && !am_daemon) {
rprintf(FERROR, "io timeout after %d seconds -- exiting\n",
---- orig/options.c 2005-03-17 09:05:21
+--- orig/options.c 2005-03-24 16:41:46
+++ options.c 2005-01-28 19:35:23
@@ -105,6 +105,7 @@ int checksum_seed = 0;
int inplace = 0;
default:
/* A large opt value means that set_refuse_options()
* turned this option off. */
-@@ -1352,6 +1388,15 @@ void server_options(char **args,int *arg
+@@ -1347,6 +1383,15 @@ void server_options(char **args,int *arg
args[ac++] = arg;
}