X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/dde5b7722603b9818bdea65b4ef00bdbc6fbf9a2..4afab316073bed7dbd6215f788daf753e83c342e:/io.c diff --git a/io.c b/io.c index e23c69a8..567065b9 100644 --- a/io.c +++ b/io.c @@ -107,6 +107,7 @@ static char int_byte_cnt[64] = { 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 8, 9, /* (C0 - FF)/4 */ }; +static void msg2sndr_flush(void); static void readfd(int fd, char *buffer, size_t N); static void writefd(int fd, const char *buf, size_t len); static void writefd_unbuffered(int fd, const char *buf, size_t len); @@ -263,6 +264,7 @@ static void read_msg_fd(void) /* Temporarily disable msg_fd_in. This is needed to avoid looping back * to this routine from writefd_unbuffered(). */ msg_fd_in = -1; + defer_forwarding_messages++; readfd(fd, buf, 4); tag = IVAL(buf, 0); @@ -357,7 +359,9 @@ static void read_msg_fd(void) exit_cleanup(RERR_STREAMIO); } + defer_forwarding_messages--; msg_fd_in = fd; + msg2sndr_flush(); } /* This is used by the generator to limit how many file transfers can