Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tweaked set_allow_inc_recurse() a bit more.
[rsync/rsync.git]
/
io.c
diff --git
a/io.c
b/io.c
index
d89bbf4
..
3faf83d
100644
(file)
--- a/
io.c
+++ b/
io.c
@@
-28,6
+28,7
@@
* io_start_multiplex_out() and io_start_multiplex_in(). */
#include "rsync.h"
* io_start_multiplex_out() and io_start_multiplex_in(). */
#include "rsync.h"
+#include "ifuncs.h"
/** If no timeout is specified then use a 60 second select timeout */
#define SELECT_TIMEOUT 60
/** If no timeout is specified then use a 60 second select timeout */
#define SELECT_TIMEOUT 60
@@
-52,7
+53,7
@@
extern int protocol_version;
extern int remove_source_files;
extern int preserve_hard_links;
extern struct stats stats;
extern int remove_source_files;
extern int preserve_hard_links;
extern struct stats stats;
-extern struct file_list *cur_flist
, *first_flist
;
+extern struct file_list *cur_flist;
#ifdef ICONV_OPTION
extern int filesfrom_convert;
extern iconv_t ic_send, ic_recv;
#ifdef ICONV_OPTION
extern int filesfrom_convert;
extern iconv_t ic_send, ic_recv;
@@
-387,6
+388,12
@@
static void read_msg_fd(void)
goto invalid_msg;
flist_eof = 1;
break;
goto invalid_msg;
flist_eof = 1;
break;
+ case MSG_IO_ERROR:
+ if (len != 4)
+ goto invalid_msg;
+ readfd(fd, buf, len);
+ io_error |= IVAL(buf, 0);
+ break;
case MSG_DELETED:
if (len >= (int)sizeof buf || !am_generator)
goto invalid_msg;
case MSG_DELETED:
if (len >= (int)sizeof buf || !am_generator)
goto invalid_msg;
@@
-1040,6
+1047,7
@@
static int readfd_unbuffered(int fd, char *buf, size_t len)
if (msg_bytes != 4)
goto invalid_msg;
read_loop(fd, line, msg_bytes);
if (msg_bytes != 4)
goto invalid_msg;
read_loop(fd, line, msg_bytes);
+ send_msg_int(MSG_IO_ERROR, IVAL(line, 0));
io_error |= IVAL(line, 0);
break;
case MSG_DELETED:
io_error |= IVAL(line, 0);
break;
case MSG_DELETED:
@@
-1853,6
+1861,8
@@
void start_write_batch(int fd)
* actual communication so far depends on whether a daemon
* is involved. */
write_int(batch_fd, protocol_version);
* actual communication so far depends on whether a daemon
* is involved. */
write_int(batch_fd, protocol_version);
+ if (protocol_version >= 30)
+ write_byte(batch_fd, inc_recurse);
write_int(batch_fd, checksum_seed);
if (am_sender)
write_int(batch_fd, checksum_seed);
if (am_sender)