Matt McCutchen's Web Site
/
rsync
/
rsync-patches.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
We now pass the --detect-renamed option to the server if we're not
[rsync/rsync-patches.git]
/
threaded-receiver.diff
diff --git
a/threaded-receiver.diff
b/threaded-receiver.diff
index
6fbe409
..
ea26547
100644
(file)
--- a/
threaded-receiver.diff
+++ b/
threaded-receiver.diff
@@
-87,7
+87,7
@@
After applying this patch, run these commands for a successful build:
extern int protocol_version;
extern int fuzzy_basis;
extern int always_checksum;
extern int protocol_version;
extern int fuzzy_basis;
extern int always_checksum;
-@@ -9
8,6 +97
,11 @@ static int deletion_count = 0; /* used t
+@@ -9
7,6 +96
,11 @@ static int deletion_count = 0; /* used t
static int can_link_symlinks = 1; /* start out optimistic */
static int can_link_devices = 1;
static int can_link_symlinks = 1; /* start out optimistic */
static int can_link_devices = 1;
@@
-99,7
+99,7
@@
After applying this patch, run these commands for a successful build:
/* For calling delete_file() */
#define DEL_FORCE_RECURSE (1<<1) /* recurse even w/o --force */
#define DEL_TERSE (1<<3)
/* For calling delete_file() */
#define DEL_FORCE_RECURSE (1<<1) /* recurse even w/o --force */
#define DEL_TERSE (1<<3)
-@@ -44
6,8 +450
,8 @@ static void sum_sizes_sqroot(struct sum_
+@@ -44
5,8 +449
,8 @@ static void sum_sizes_sqroot(struct sum_
}
if (protocol_version < 27) {
}
if (protocol_version < 27) {
@@
-110,7
+110,7
@@
After applying this patch, run these commands for a successful build:
s2length = SUM_LENGTH;
} else {
int32 c;
s2length = SUM_LENGTH;
} else {
int32 c;
-@@ -45
7,7 +461
,7 @@ static void sum_sizes_sqroot(struct sum_
+@@ -45
6,7 +460
,7 @@ static void sum_sizes_sqroot(struct sum_
for (c = blength; c >>= 1 && b; b--) {}
/* add a bit, subtract rollsum, round up. */
s2length = (b + 1 - 32 + 7) / 8; /* --optimize in compiler-- */
for (c = blength; c >>= 1 && b; b--) {}
/* add a bit, subtract rollsum, round up. */
s2length = (b + 1 - 32 + 7) / 8; /* --optimize in compiler-- */
@@
-119,7
+119,7
@@
After applying this patch, run these commands for a successful build:
s2length = MIN(s2length, SUM_LENGTH);
}
s2length = MIN(s2length, SUM_LENGTH);
}
-@@ -49
1,7 +495
,7 @@ static void generate_and_send_sums(int f
+@@ -49
0,7 +494
,7 @@ static void generate_and_send_sums(int f
sum_sizes_sqroot(&sum, len);
write_sum_head(f_out, &sum);
sum_sizes_sqroot(&sum, len);
write_sum_head(f_out, &sum);
@@
-128,7
+128,7
@@
After applying this patch, run these commands for a successful build:
return;
if (len > 0)
return;
if (len > 0)
-@@ -5
10,7 +514
,7 @@ static void generate_and_send_sums(int f
+@@ -5
09,7 +513
,7 @@ static void generate_and_send_sums(int f
if (f_copy >= 0) {
full_write(f_copy, map, n1);
if (f_copy >= 0) {
full_write(f_copy, map, n1);
@@
-137,7
+137,7
@@
After applying this patch, run these commands for a successful build:
continue;
}
continue;
}
-@@ -11
40,7 +1144
,7 @@ static void recv_generator(char *fname,
+@@ -11
52,7 +1156
,7 @@ static void recv_generator(char *fname,
return;
}
return;
}
@@
-146,7
+146,7
@@
After applying this patch, run these commands for a successful build:
return;
if (fnamecmp_type <= FNAMECMP_BASIS_DIR_HIGH)
return;
if (fnamecmp_type <= FNAMECMP_BASIS_DIR_HIGH)
-@@ -1
195,7 +1199
,7 @@ static void recv_generator(char *fname,
+@@ -1
207,7 +1211
,7 @@ static void recv_generator(char *fname,
goto notify_others;
}
goto notify_others;
}
@@
-155,7
+155,7
@@
After applying this patch, run these commands for a successful build:
if (!(backupptr = get_backup_name(fname))) {
close(fd);
return;
if (!(backupptr = get_backup_name(fname))) {
close(fd);
return;
-@@ -12
84,7 +1288
,10 @@ void generate_files(int f_out, struct fi
+@@ -12
98,7 +1302
,10 @@ void generate_files(int f_out, struct fi
int save_ignore_existing = ignore_existing;
int save_ignore_non_existing = ignore_non_existing;
int save_do_progress = do_progress;
int save_ignore_existing = ignore_existing;
int save_ignore_non_existing = ignore_non_existing;
int save_do_progress = do_progress;
@@
-167,7
+167,7
@@
After applying this patch, run these commands for a successful build:
if (protocol_version >= 29) {
itemizing = 1;
if (protocol_version >= 29) {
itemizing = 1;
-@@ -13
13,7 +1320
,7 @@ void generate_files(int f_out, struct fi
+@@ -13
27,7 +1334
,7 @@ void generate_files(int f_out, struct fi
do_delete_pass(flist);
do_progress = 0;
do_delete_pass(flist);
do_progress = 0;
@@
-176,7
+176,7
@@
After applying this patch, run these commands for a successful build:
whole_file = 0;
if (verbose >= 2) {
rprintf(FINFO, "delta-transmission %s\n",
whole_file = 0;
if (verbose >= 2) {
rprintf(FINFO, "delta-transmission %s\n",
-@@ -13
22,12 +1329
,6 @@ void generate_files(int f_out, struct fi
+@@ -13
36,12 +1343
,6 @@ void generate_files(int f_out, struct fi
: "enabled");
}
: "enabled");
}
@@
-189,7
+189,7
@@
After applying this patch, run these commands for a successful build:
for (i = 0; i < flist->count; i++) {
struct file_struct *file = flist->files[i];
for (i = 0; i < flist->count; i++) {
struct file_struct *file = flist->files[i];
-@@ -13
71,23 +1372
,34 @@ void generate_files(int f_out, struct fi
+@@ -13
85,23 +1386
,34 @@ void generate_files(int f_out, struct fi
delete_in_dir(NULL, NULL, NULL, NULL);
phase++;
delete_in_dir(NULL, NULL, NULL, NULL);
phase++;
@@
-230,7
+230,7
@@
After applying this patch, run these commands for a successful build:
if (local_name)
strlcpy(fbuf, local_name, sizeof fbuf);
else
if (local_name)
strlcpy(fbuf, local_name, sizeof fbuf);
else
-@@ -1
399,27 +1411
,43 @@ void generate_files(int f_out, struct fi
+@@ -1
413,27 +1425
,43 @@ void generate_files(int f_out, struct fi
phase++;
ignore_non_existing = save_ignore_non_existing;
ignore_existing = save_ignore_existing;
phase++;
ignore_non_existing = save_ignore_non_existing;
ignore_existing = save_ignore_existing;
@@
-283,7
+283,7
@@
After applying this patch, run these commands for a successful build:
do_progress = save_do_progress;
--- old/io.c
+++ new/io.c
do_progress = save_do_progress;
--- old/io.c
+++ new/io.c
-@@ -4
7,7 +47,6
@@ extern int allowed_lull;
+@@ -4
6,20 +46,17
@@ extern int allowed_lull;
extern int am_server;
extern int am_daemon;
extern int am_sender;
extern int am_server;
extern int am_daemon;
extern int am_sender;
@@
-291,7
+291,12
@@
After applying this patch, run these commands for a successful build:
extern int eol_nulls;
extern int read_batch;
extern int csum_length;
extern int eol_nulls;
extern int read_batch;
extern int csum_length;
-@@ -60,7 +59,6 @@ extern struct stats stats;
+ extern int checksum_seed;
+ extern int protocol_version;
+-extern int remove_sent_files;
+ extern int preserve_hard_links;
+ extern char *filesfrom_host;
+ extern struct stats stats;
extern struct file_list *the_file_list;
const char phase_unknown[] = "unknown";
extern struct file_list *the_file_list;
const char phase_unknown[] = "unknown";
@@
-299,7
+304,7
@@
After applying this patch, run these commands for a successful build:
int batch_fd = -1;
int batch_gen_fd = -1;
int batch_fd = -1;
int batch_gen_fd = -1;
-@@ -8
4,7 +82
,6 @@ const char *io_read_phase = phase_unknow
+@@ -8
3,7 +80
,6 @@ const char *io_read_phase = phase_unknow
int kluge_around_eof = 0;
int msg_fd_in = -1;
int kluge_around_eof = 0;
int msg_fd_in = -1;
@@
-307,7
+312,7
@@
After applying this patch, run these commands for a successful build:
int sock_f_in = -1;
int sock_f_out = -1;
int sock_f_in = -1;
int sock_f_out = -1;
-@@ -1
09,27 +106,32 @@ static int select_timeout = SELECT_TIMEO
+@@ -1
10,27 +106,32 @@ static OFF_T active_bytecnt = 0;
static void read_loop(int fd, char *buf, size_t len);
struct flist_ndx_item {
static void read_loop(int fd, char *buf, size_t len);
struct flist_ndx_item {
@@
-346,7
+351,7
@@
After applying this patch, run these commands for a successful build:
static void flist_ndx_push(struct flist_ndx_list *lp, int ndx)
{
static void flist_ndx_push(struct flist_ndx_list *lp, int ndx)
{
-@@ -1
39
,27 +141,31 @@ static void flist_ndx_push(struct flist_
+@@ -1
40
,27 +141,31 @@ static void flist_ndx_push(struct flist_
out_of_memory("flist_ndx_push");
item->next = NULL;
item->ndx = ndx;
out_of_memory("flist_ndx_push");
item->next = NULL;
item->ndx = ndx;
@@
-384,7
+389,7
@@
After applying this patch, run these commands for a successful build:
return ndx;
}
return ndx;
}
-@@ -16
8
,7 +174,7 @@ static void check_timeout(void)
+@@ -16
9
,7 +174,7 @@ static void check_timeout(void)
{
time_t t;
{
time_t t;
@@
-393,7
+398,7
@@
After applying this patch, run these commands for a successful build:
return;
if (!last_io_in) {
return;
if (!last_io_in) {
-@@ -2
09
,45 +215,40 @@ void set_io_timeout(int secs)
+@@ -2
10
,45 +215,40 @@ void set_io_timeout(int secs)
/* Setup the fd used to receive MSG_* messages. Only needed during the
* early stages of being a local sender (up through the sending of the
/* Setup the fd used to receive MSG_* messages. Only needed during the
* early stages of being a local sender (up through the sending of the
@@
-451,7
+456,7
@@
After applying this patch, run these commands for a successful build:
static void read_msg_fd(void)
{
char buf[2048];
static void read_msg_fd(void)
{
char buf[2048];
-@@ -26
6,47
+267,6 @@ static void read_msg_fd(void)
+@@ -26
7,51
+267,6 @@ static void read_msg_fd(void)
tag = (tag >> 24) - MPLEX_BASE;
switch (tag) {
tag = (tag >> 24) - MPLEX_BASE;
switch (tag) {
@@
-468,6
+473,8
@@
After applying this patch, run these commands for a successful build:
- exit_cleanup(RERR_STREAMIO);
- }
- read_loop(fd, buf, 4);
- exit_cleanup(RERR_STREAMIO);
- }
- read_loop(fd, buf, 4);
+- if (remove_sent_files)
+- decrement_active_files(IVAL(buf,0));
- flist_ndx_push(&redo_list, IVAL(buf,0));
- break;
- case MSG_DELETED:
- flist_ndx_push(&redo_list, IVAL(buf,0));
- break;
- case MSG_DELETED:
@@
-484,8
+491,10
@@
After applying this patch, run these commands for a successful build:
- exit_cleanup(RERR_STREAMIO);
- }
- read_loop(fd, buf, len);
- exit_cleanup(RERR_STREAMIO);
- }
- read_loop(fd, buf, len);
-- if (remove_sent_files)
+- if (remove_sent_files) {
+- decrement_active_files(IVAL(buf,0));
- io_multiplex_write(MSG_SUCCESS, buf, len);
- io_multiplex_write(MSG_SUCCESS, buf, len);
+- }
- if (preserve_hard_links)
- flist_ndx_push(&hlink_list, IVAL(buf,0));
- break;
- if (preserve_hard_links)
- flist_ndx_push(&hlink_list, IVAL(buf,0));
- break;
@@
-499,8
+508,8
@@
After applying this patch, run these commands for a successful build:
case MSG_INFO:
case MSG_ERROR:
case MSG_LOG:
case MSG_INFO:
case MSG_ERROR:
case MSG_LOG:
-@@ -3
27,71 +287,75 @@ static void read_msg_fd(void
)
-
msg_fd_in = fd
;
+@@ -3
54,71 +309,75 @@ void decrement_active_files(int ndx
)
+
active_bytecnt -= the_file_list->files[ndx]->length
;
}
-/* Try to push messages off the list onto the wire. If we leave with more
}
-/* Try to push messages off the list onto the wire. If we leave with more
@@
-619,7
+628,7
@@
After applying this patch, run these commands for a successful build:
return flist_ndx_pop(&hlink_list);
}
return flist_ndx_pop(&hlink_list);
}
-@@ -4
71,11 +435
,6 @@ static int read_timeout(int fd, char *bu
+@@ -4
98,11 +457
,6 @@ static int read_timeout(int fd, char *bu
FD_ZERO(&r_fds);
FD_ZERO(&w_fds);
FD_SET(fd, &r_fds);
FD_ZERO(&r_fds);
FD_ZERO(&w_fds);
FD_SET(fd, &r_fds);
@@
-631,7
+640,7
@@
After applying this patch, run these commands for a successful build:
if (io_filesfrom_f_out >= 0) {
int new_fd;
if (io_filesfrom_buflen == 0) {
if (io_filesfrom_f_out >= 0) {
int new_fd;
if (io_filesfrom_buflen == 0) {
-@@ -5
08,9 +467
,6 @@ static int read_timeout(int fd, char *bu
+@@ -5
35,9 +489
,6 @@ static int read_timeout(int fd, char *bu
continue;
}
continue;
}
@@
-641,7
+650,7
@@
After applying this patch, run these commands for a successful build:
if (io_filesfrom_f_out >= 0) {
if (io_filesfrom_buflen) {
if (FD_ISSET(io_filesfrom_f_out, &w_fds)) {
if (io_filesfrom_f_out >= 0) {
if (io_filesfrom_buflen) {
if (FD_ISSET(io_filesfrom_f_out, &w_fds)) {
-@@ -8
32,6 +788
,8 @@ static void readfd(int fd, char *buffer,
+@@ -8
59,6 +810
,8 @@ static void readfd(int fd, char *buffer,
}
if (fd == write_batch_monitor_in) {
}
if (fd == write_batch_monitor_in) {
@@
-650,7
+659,7
@@
After applying this patch, run these commands for a successful build:
if ((size_t)write(batch_fd, buffer, total) != total)
exit_cleanup(RERR_FILEIO);
}
if ((size_t)write(batch_fd, buffer, total) != total)
exit_cleanup(RERR_FILEIO);
}
-@@ -1
087,7 +1045
,6 @@ static void writefd_unbuffered(int fd,ch
+@@ -1
114,7 +1067
,6 @@ static void writefd_unbuffered(int fd,ch
* to grab any messages they sent before they died. */
while (fd == sock_f_out && io_multiplexing_in) {
set_io_timeout(30);
* to grab any messages they sent before they died. */
while (fd == sock_f_out && io_multiplexing_in) {
set_io_timeout(30);
@@
-658,7
+667,7
@@
After applying this patch, run these commands for a successful build:
readfd_unbuffered(sock_f_in, io_filesfrom_buf,
sizeof io_filesfrom_buf);
}
readfd_unbuffered(sock_f_in, io_filesfrom_buf,
sizeof io_filesfrom_buf);
}
-@@ -1
097,7 +1054
,7 @@ static void writefd_unbuffered(int fd,ch
+@@ -1
124,7 +1076
,7 @@ static void writefd_unbuffered(int fd,ch
total += cnt;
if (fd == sock_f_out) {
total += cnt;
if (fd == sock_f_out) {
@@
-667,7
+676,7
@@
After applying this patch, run these commands for a successful build:
last_io_out = time(NULL);
sleep_for_bwlimit(cnt);
}
last_io_out = time(NULL);
sleep_for_bwlimit(cnt);
}
-@@ -11
21,7 +1078
,7 @@ static void mplex_write(enum msgcode cod
+@@ -11
48,7 +1100
,7 @@ static void mplex_write(enum msgcode cod
* cause output to occur down the socket. Setting contiguous_write_len
* prevents the reading of msg_fd_in once we actually start to write
* this sequence of data (though we might read it before the start). */
* cause output to occur down the socket. Setting contiguous_write_len
* prevents the reading of msg_fd_in once we actually start to write
* this sequence of data (though we might read it before the start). */
@@
-676,7
+685,7
@@
After applying this patch, run these commands for a successful build:
contiguous_write_len = len + 4;
if (n > sizeof buffer - 4)
contiguous_write_len = len + 4;
if (n > sizeof buffer - 4)
-@@ -11
37,31 +1094
,29 @@ static void mplex_write(enum msgcode cod
+@@ -11
64,31 +1116
,29 @@ static void mplex_write(enum msgcode cod
if (len)
writefd_unbuffered(sock_f_out, buf, len);
if (len)
writefd_unbuffered(sock_f_out, buf, len);
@@
-720,7
+729,7
@@
After applying this patch, run these commands for a successful build:
if (fd == sock_f_out)
stats.total_written += len;
if (fd == sock_f_out)
stats.total_written += len;
-@@ -1
374,9 +1329
,3 @@ void start_write_batch(int fd)
+@@ -1
401,9 +1351
,3 @@ void start_write_batch(int fd)
else
write_batch_monitor_in = fd;
}
else
write_batch_monitor_in = fd;
}
@@
-740,7
+749,7
@@
After applying this patch, run these commands for a successful build:
extern int allow_8bit_chars;
extern int protocol_version;
extern int preserve_times;
extern int allow_8bit_chars;
extern int protocol_version;
extern int preserve_times;
-@@ -7
5,7 +74
,6 @@ struct {
+@@ -7
6,7 +75
,6 @@ struct {
{ RERR_IPC , "error in IPC code" },
{ RERR_CRASHED , "sibling process crashed" },
{ RERR_TERMINATED , "sibling process terminated abnormally" },
{ RERR_IPC , "error in IPC code" },
{ RERR_CRASHED , "sibling process crashed" },
{ RERR_TERMINATED , "sibling process terminated abnormally" },
@@
-769,7
+778,7
@@
After applying this patch, run these commands for a successful build:
extern int am_daemon;
extern int blocking_io;
extern int remove_sent_files;
extern int am_daemon;
extern int blocking_io;
extern int remove_sent_files;
-@@ -8
4,9 +83
,20 @@ struct pid_status {
+@@ -8
5,9 +84
,20 @@ struct pid_status {
static time_t starttime, endtime;
static int64 total_read, total_written;
static time_t starttime, endtime;
static int64 total_read, total_written;
@@
-788,9
+797,9
@@
After applying this patch, run these commands for a successful build:
+}
+
/* Works like waitpid(), but if we already harvested the child pid in our
+}
+
/* Works like waitpid(), but if we already harvested the child pid in our
- *
sigchld_handler
(), we succeed instead of returning an error. */
+ *
remember_children
(), we succeed instead of returning an error. */
pid_t wait_process(pid_t pid, int *status_ptr, int flags)
pid_t wait_process(pid_t pid, int *status_ptr, int flags)
-@@ -16
3,7 +173
,7 @@ static void handle_stats(int f)
+@@ -16
4,7 +174
,7 @@ static void handle_stats(int f)
show_flist_stats();
}
show_flist_stats();
}
@@
-799,7
+808,7
@@
After applying this patch, run these commands for a successful build:
return;
if (am_daemon) {
return;
if (am_daemon) {
-@@ -61
8,12 +628
,30 @@ static void do_server_sender(int f_in, i
+@@ -61
7,12 +627
,30 @@ static void do_server_sender(int f_in, i
exit_cleanup(0);
}
exit_cleanup(0);
}
@@
-833,7
+842,7
@@
After applying this patch, run these commands for a successful build:
/* The receiving side mustn't obey this, or an existing symlink that
* points to an identical file won't be replaced by the referent. */
/* The receiving side mustn't obey this, or an existing symlink that
* points to an identical file won't be replaced by the referent. */
-@@ -63
2,70 +660
,16 @@ static int do_recv(int f_in,int f_out,st
+@@ -63
1,70 +659
,16 @@ static int do_recv(int f_in,int f_out,st
if (preserve_hard_links)
init_hard_links();
if (preserve_hard_links)
init_hard_links();
@@
-909,7
+918,7
@@
After applying this patch, run these commands for a successful build:
generate_files(f_out, flist, local_name);
handle_stats(-1);
generate_files(f_out, flist, local_name);
handle_stats(-1);
-@@ -70
6,10 +680
,13 @@ static int do_recv(int f_in,int f_out,st
+@@ -70
5,10 +679
,13 @@ static int do_recv(int f_in,int f_out,st
}
io_flush(FULL_FLUSH);
}
io_flush(FULL_FLUSH);
@@
-927,7
+936,7
@@
After applying this patch, run these commands for a successful build:
}
}
-@@ -107
7,22 +1054
,6 @@ static int start_client(int argc, char *
+@@ -107
8,22 +1055
,6 @@ static int start_client(int argc, char *
return ret;
}
return ret;
}
@@
-947,30
+956,30
@@
After applying this patch, run these commands for a successful build:
- _exit(0);
-}
-
- _exit(0);
-}
-
-
static RETSIGTYPE sigchld_handler
(UNUSED(int val))
+
RETSIGTYPE remember_children
(UNUSED(int val))
{
#ifdef WNOHANG
{
#ifdef WNOHANG
-@@ -118
4,8 +1145
,6 @@ int main(int argc,char *argv[])
+@@ -118
5,8 +1146
,6 @@ int main(int argc,char *argv[])
# endif
sigact.sa_flags = SA_NOCLDSTOP;
#endif
- SIGACTMASK(SIGUSR1, sigusr1_handler);
- SIGACTMASK(SIGUSR2, sigusr2_handler);
# endif
sigact.sa_flags = SA_NOCLDSTOP;
#endif
- SIGACTMASK(SIGUSR1, sigusr1_handler);
- SIGACTMASK(SIGUSR2, sigusr2_handler);
- SIGACTMASK(SIGCHLD,
sigchld_handler
);
+ SIGACTMASK(SIGCHLD,
remember_children
);
#ifdef MAINTAINER_MODE
SIGACTMASK(SIGSEGV, rsync_panic_handler);
--- old/match.c
+++ new/match.c
#ifdef MAINTAINER_MODE
SIGACTMASK(SIGSEGV, rsync_panic_handler);
--- old/match.c
+++ new/match.c
-@@ -21,7 +21,7 @@
+@@ -20,7 +20,7 @@
+ #include "rsync.h"
extern int verbose;
extern int verbose;
- extern int am_server;
-extern int do_progress;
+extern int recv_progress;
extern int checksum_seed;
extern int append_mode;
-extern int do_progress;
+extern int recv_progress;
extern int checksum_seed;
extern int append_mode;
-@@ -13
3,7 +133
,7 @@ static void matched(int f, struct sum_st
+@@ -13
2,7 +132
,7 @@ static void matched(int f, struct sum_st
else
last_match = offset;
else
last_match = offset;
@@
-979,7
+988,7
@@
After applying this patch, run these commands for a successful build:
show_progress(last_match, buf->file_size);
}
show_progress(last_match, buf->file_size);
}
-@@ -33
3,7 +333
,7 @@ void match_sums(int f, struct sum_struct
+@@ -33
2,7 +332
,7 @@ void match_sums(int f, struct sum_struct
if (append_mode) {
OFF_T j = 0;
for (j = CHUNK_SIZE; j < s->flength; j += CHUNK_SIZE) {
if (append_mode) {
OFF_T j = 0;
for (j = CHUNK_SIZE; j < s->flength; j += CHUNK_SIZE) {
@@
-988,7
+997,7
@@
After applying this patch, run these commands for a successful build:
show_progress(last_match, buf->file_size);
sum_update(map_ptr(buf, last_match, CHUNK_SIZE),
CHUNK_SIZE);
show_progress(last_match, buf->file_size);
sum_update(map_ptr(buf, last_match, CHUNK_SIZE),
CHUNK_SIZE);
-@@ -34
1,7 +341
,7 @@ void match_sums(int f, struct sum_struct
+@@ -34
0,7 +340
,7 @@ void match_sums(int f, struct sum_struct
}
if (last_match < s->flength) {
int32 len = s->flength - last_match;
}
if (last_match < s->flength) {
int32 len = s->flength - last_match;
@@
-999,14
+1008,14
@@
After applying this patch, run these commands for a successful build:
last_match = s->flength;
--- old/options.c
+++ new/options.c
last_match = s->flength;
--- old/options.c
+++ new/options.c
-@@ -7
3,7 +73
,6 @@ int def_compress_level = Z_DEFAULT_COMPR
+@@ -7
4,7 +74
,6 @@ int def_compress_level = Z_DEFAULT_COMPR
int am_root = 0;
int am_server = 0;
int am_sender = 0;
-int am_generator = 0;
int am_starting_up = 1;
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 relative_paths = -1;
+ int implied_dirs = 1;
@@ -95,6 +94,7 @@ int am_daemon = 0;
int daemon_over_rsh = 0;
int do_stats = 0;
@@ -95,6 +94,7 @@ int am_daemon = 0;
int daemon_over_rsh = 0;
int do_stats = 0;
@@
-1015,7
+1024,7
@@
After applying this patch, run these commands for a successful build:
int keep_partial = 0;
int safe_symlinks = 0;
int copy_unsafe_links = 0;
int keep_partial = 0;
int safe_symlinks = 0;
int copy_unsafe_links = 0;
-@@ -129
2,6 +1292
,7 @@ int parse_arguments(int *argc, const cha
+@@ -129
9,6 +1299
,7 @@ int parse_arguments(int *argc, const cha
if (do_progress && !verbose && !log_before_transfer && !am_server)
verbose = 1;
if (do_progress && !verbose && !log_before_transfer && !am_server)
verbose = 1;
@@
-1054,7
+1063,7
@@
After applying this patch, run these commands for a successful build:
extern int log_before_transfer;
extern int log_format_has_i;
extern int daemon_log_format_has_i;
extern int log_before_transfer;
extern int log_format_has_i;
extern int daemon_log_format_has_i;
-@@ -15
8,7 +158
,7 @@ static int receive_data(int f_in, char *
+@@ -15
3,7 +153
,7 @@ static int receive_data(int f_in, char *
if (sum.remainder)
sum.flength -= sum.blength - sum.remainder;
for (j = CHUNK_SIZE; j < sum.flength; j += CHUNK_SIZE) {
if (sum.remainder)
sum.flength -= sum.blength - sum.remainder;
for (j = CHUNK_SIZE; j < sum.flength; j += CHUNK_SIZE) {
@@
-1063,7
+1072,7
@@
After applying this patch, run these commands for a successful build:
show_progress(offset, total_size);
sum_update(map_ptr(mapbuf, offset, CHUNK_SIZE),
CHUNK_SIZE);
show_progress(offset, total_size);
sum_update(map_ptr(mapbuf, offset, CHUNK_SIZE),
CHUNK_SIZE);
-@@ -16
6,7 +166
,7 @@ static int receive_data(int f_in, char *
+@@ -16
1,7 +161
,7 @@ static int receive_data(int f_in, char *
}
if (offset < sum.flength) {
int32 len = sum.flength - offset;
}
if (offset < sum.flength) {
int32 len = sum.flength - offset;
@@
-1072,7
+1081,7
@@
After applying this patch, run these commands for a successful build:
show_progress(offset, total_size);
sum_update(map_ptr(mapbuf, offset, len), len);
offset = sum.flength;
show_progress(offset, total_size);
sum_update(map_ptr(mapbuf, offset, len), len);
offset = sum.flength;
-@@ -17
9,7 +179
,7 @@ static int receive_data(int f_in, char *
+@@ -17
4,7 +174
,7 @@ static int receive_data(int f_in, char *
}
while ((i = recv_token(f_in, &data)) != 0) {
}
while ((i = recv_token(f_in, &data)) != 0) {
@@
-1081,7
+1090,7
@@
After applying this patch, run these commands for a successful build:
show_progress(offset, total_size);
if (i > 0) {
show_progress(offset, total_size);
if (i > 0) {
-@@ -24
7,7 +247
,7 @@ static int receive_data(int f_in, char *
+@@ -24
2,7 +242
,7 @@ static int receive_data(int f_in, char *
ftruncate(fd, offset);
#endif
ftruncate(fd, offset);
#endif
@@
-1090,7
+1099,7
@@
After applying this patch, run these commands for a successful build:
end_progress(total_size);
if (fd != -1 && offset > 0 && sparse_end(fd) != 0) {
end_progress(total_size);
if (fd != -1 && offset > 0 && sparse_end(fd) != 0) {
-@@ -29
8,12 +298
,12 @@ static void handle_delayed_updates(struc
+@@ -29
3,12 +293
,12 @@ static void handle_delayed_updates(struc
"rename failed for %s (from %s)",
full_fname(fname), partialptr);
} else {
"rename failed for %s (from %s)",
full_fname(fname), partialptr);
} else {
@@
-1106,7
+1115,7
@@
After applying this patch, run these commands for a successful build:
handle_partial_dir(partialptr, PDIR_DELETE);
}
}
handle_partial_dir(partialptr, PDIR_DELETE);
}
}
-@@ -3
54,11 +354
,6 @@ int recv_files(int f_in, struct file_lis
+@@ -3
49,11 +349
,6 @@ int recv_files(int f_in, struct file_lis
if (verbose > 2)
rprintf(FINFO,"recv_files(%d) starting\n",flist->count);
if (verbose > 2)
rprintf(FINFO,"recv_files(%d) starting\n",flist->count);
@@
-1118,7
+1127,7
@@
After applying this patch, run these commands for a successful build:
if (delay_updates)
delayed_bits = bitbag_create(flist->count);
if (delay_updates)
delayed_bits = bitbag_create(flist->count);
-@@ -37
9,7 +374
,7 @@ int recv_files(int f_in, struct file_lis
+@@ -37
4,7 +369
,7 @@ int recv_files(int f_in, struct file_lis
rprintf(FINFO, "recv_files phase=%d\n", phase);
if (phase == 2 && delay_updates)
handle_delayed_updates(flist, local_name);
rprintf(FINFO, "recv_files phase=%d\n", phase);
if (phase == 2 && delay_updates)
handle_delayed_updates(flist, local_name);
@@
-1127,7
+1136,7
@@
After applying this patch, run these commands for a successful build:
if (keep_partial && !partial_dir)
make_backups = 0; /* prevents double backup */
if (append_mode) {
if (keep_partial && !partial_dir)
make_backups = 0; /* prevents double backup */
if (append_mode) {
-@@ -
601,7 +596
,7 @@ int recv_files(int f_in, struct file_lis
+@@ -
596,7 +591
,7 @@ int recv_files(int f_in, struct file_lis
/* log the transfer */
if (log_before_transfer)
log_item(file, &initial_stats, iflags, NULL);
/* log the transfer */
if (log_before_transfer)
log_item(file, &initial_stats, iflags, NULL);
@@
-1136,13
+1145,14
@@
After applying this patch, run these commands for a successful build:
rprintf(FINFO, "%s\n", fname);
/* recv file data */
rprintf(FINFO, "%s\n", fname);
/* recv file data */
-@@ -6
44,11 +639,12
@@ int recv_files(int f_in, struct file_lis
+@@ -6
39,11 +634,13
@@ int recv_files(int f_in, struct file_lis
cleanup_disable();
if (recv_ok > 0) {
- if (remove_sent_files
- || (preserve_hard_links && file->link_u.links)) {
+ if (remove_sent_files) {
cleanup_disable();
if (recv_ok > 0) {
- if (remove_sent_files
- || (preserve_hard_links && file->link_u.links)) {
+ if (remove_sent_files) {
++ decrement_active_files(i);
SIVAL(numbuf, 0, i);
send_msg(MSG_SUCCESS, numbuf, 4);
}
SIVAL(numbuf, 0, i);
send_msg(MSG_SUCCESS, numbuf, 4);
}
@@
-1151,22
+1161,20
@@
After applying this patch, run these commands for a successful build:
} else if (!recv_ok) {
int msgtype = phase || read_batch ? FERROR : FINFO;
if (msgtype == FERROR || verbose) {
} else if (!recv_ok) {
int msgtype = phase || read_batch ? FERROR : FINFO;
if (msgtype == FERROR || verbose) {
-@@ -670,10 +666,8 @@ int recv_files(int f_in, struct file_lis
- "%s: %s failed verification -- update %s%s.\n",
+@@ -666,8 +663,8 @@ int recv_files(int f_in, struct file_lis
errstr, fname, keptstr, redostr);
}
errstr, fname, keptstr, redostr);
}
-
-
if (!phase) {
+
if (!phase) {
- SIVAL(numbuf, 0, i);
- send_msg(MSG_REDO, numbuf, 4);
- SIVAL(numbuf, 0, i);
- send_msg(MSG_REDO, numbuf, 4);
-- }
-+ if (!phase)
++ decrement_active_files(i);
+ push_redo_num(i);
+ push_redo_num(i);
+ }
}
}
}
}
- make_backups = save_make_backups;
--- old/rsync.c
+++ new/rsync.c
--- old/rsync.c
+++ new/rsync.c
-@@ -4
1,7 +41,6 @@ extern int orig_umask
;
+@@ -4
0,7 +40,6 @@ extern int omit_dir_times
;
extern int am_root;
extern int am_server;
extern int am_sender;
extern int am_root;
extern int am_server;
extern int am_sender;
@@
-1174,7
+1182,7
@@
After applying this patch, run these commands for a successful build:
extern int am_starting_up;
extern int allow_8bit_chars;
extern int preserve_uid;
extern int am_starting_up;
extern int allow_8bit_chars;
extern int preserve_uid;
-@@ -30
0,5 +299
,5 @@ const char *who_am_i(void)
+@@ -30
3,5 +302
,5 @@ const char *who_am_i(void)
{
if (am_starting_up)
return am_server ? "server" : "client";
{
if (am_starting_up)
return am_server ? "server" : "client";
@@
-1204,7
+1212,7
@@
After applying this patch, run these commands for a successful build:
--- old/util.c
+++ new/util.c
--- old/util.c
+++ new/util.c
-@@ -4
04,49 +404
,6 @@ int robust_rename(char *from, char *to,
+@@ -4
20,49 +420
,6 @@ int robust_rename(char *from, char *to,
return -1;
}
return -1;
}