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
Got rid of kluged value for am_sender, and instead added a new
[rsync/rsync.git]
/
io.c
diff --git
a/io.c
b/io.c
index
f01353f
..
7e02d34
100644
(file)
--- a/
io.c
+++ b/
io.c
@@
-256,6
+256,14
@@
static void read_msg_fd(void)
read_loop(fd, buf, len);
io_multiplex_write(MSG_DELETED, buf, len);
break;
read_loop(fd, buf, len);
io_multiplex_write(MSG_DELETED, buf, len);
break;
+ case MSG_SUCCESS:
+ if (len != 4 || !am_generator) {
+ rprintf(FERROR, "invalid message %d:%d\n", tag, len);
+ exit_cleanup(RERR_STREAMIO);
+ }
+ read_loop(fd, buf, len);
+ io_multiplex_write(MSG_SUCCESS, buf, len);
+ break;
case MSG_INFO:
case MSG_ERROR:
case MSG_LOG:
case MSG_INFO:
case MSG_ERROR:
case MSG_LOG:
@@
-704,6
+712,16
@@
static int readfd_unbuffered(int fd, char *buf, size_t len)
log_delete(line, S_IFREG);
remaining = 0;
break;
log_delete(line, S_IFREG);
remaining = 0;
break;
+ case MSG_SUCCESS:
+ if (remaining != 4) {
+ rprintf(FERROR, "invalid multi-message %d:%ld\n",
+ tag, (long)remaining);
+ exit_cleanup(RERR_STREAMIO);
+ }
+ read_loop(fd, line, remaining);
+ successful_send(IVAL(line, 0));
+ remaining = 0;
+ break;
case MSG_INFO:
case MSG_ERROR:
if (remaining >= sizeof line) {
case MSG_INFO:
case MSG_ERROR:
if (remaining >= sizeof line) {