Got rid of the check_for_io_err code, as it could cause a hang.
[rsync.git] / io.c
diff --git a/io.c b/io.c
index 21e8134f45ecb0fdfab0c6345b8e790b44a54927..f8712dd1f79223e2668e38ea116eb42277b06803 100644 (file)
--- a/io.c
+++ b/io.c
@@ -64,7 +64,6 @@ const char phase_unknown[] = "unknown";
 int ignore_timeout = 0;
 int batch_fd = -1;
 int msgdone_cnt = 0;
-int check_for_io_err = 0;
 
 /* Ignore an EOF error if non-zero. See whine_about_eof(). */
 int kluge_around_eof = 0;
@@ -378,8 +377,6 @@ static void read_msg_fd(void)
        len = tag & 0xFFFFFF;
        tag = (tag >> 24) - MPLEX_BASE;
 
-       check_for_io_err = 0;
-
        switch (tag) {
        case MSG_DONE:
                if (len < 0 || len > 1 || !am_generator) {
@@ -414,9 +411,6 @@ static void read_msg_fd(void)
                }
                flist = recv_file_list(fd);
                flist->parent_ndx = IVAL(buf,0);
-               /* If the sender is going to send us an MSG_IO_ERROR value, it
-                * will always be the very next message following MSG_FLIST. */
-               check_for_io_err = 1;
 #ifdef SUPPORT_HARD_LINKS
                if (preserve_hard_links)
                        match_hard_links(flist);
@@ -572,7 +566,7 @@ void send_msg_int(enum msgcode code, int num)
 
 void wait_for_receiver(void)
 {
-       if (io_flush(FULL_FLUSH))
+       if (io_flush(NORMAL_FLUSH))
                return;
        read_msg_fd();
 }
@@ -1064,8 +1058,6 @@ static int readfd_unbuffered(int fd, char *buf, size_t len)
                msg_bytes = tag & 0xFFFFFF;
                tag = (tag >> 24) - MPLEX_BASE;
 
-               check_for_io_err = 0;
-
                switch (tag) {
                case MSG_DATA:
                        if (msg_bytes > iobuf_in_siz) {