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
Allow sigaction() to be used even if sigprocmask() isn't around
[rsync/rsync.git]
/
io.c
diff --git
a/io.c
b/io.c
index
ba71098
..
6dafa2a
100644
(file)
--- a/
io.c
+++ b/
io.c
@@
-300,6
+300,13
@@
static void read_msg_fd(void)
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;
+ case MSG_SOCKERR:
+ if (!am_generator) {
+ rprintf(FERROR, "invalid message %d:%d\n", tag, len);
+ exit_cleanup(RERR_STREAMIO);
+ }
+ close_multiplexing_out();
+ /* FALL THROUGH */
case MSG_INFO:
case MSG_ERROR:
case MSG_LOG:
case MSG_INFO:
case MSG_ERROR:
case MSG_LOG:
@@
-580,9
+587,11
@@
static int read_timeout(int fd, char *buf, size_t len)
continue;
/* Don't write errors on a dead socket. */
continue;
/* Don't write errors on a dead socket. */
- if (fd == sock_f_in)
+ if (fd == sock_f_in)
{
close_multiplexing_out();
close_multiplexing_out();
- rsyserr(FERROR, errno, "read error");
+ rsyserr(FSOCKERR, errno, "read error");
+ } else
+ rsyserr(FERROR, errno, "read error");
exit_cleanup(RERR_STREAMIO);
}
exit_cleanup(RERR_STREAMIO);
}