]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
Use MSG_FLUSH in a couple more spots.
authorWayne Davison <wayne@opencoder.net>
Thu, 28 May 2020 07:41:39 +0000 (00:41 -0700)
committerWayne Davison <wayne@opencoder.net>
Thu, 28 May 2020 07:41:39 +0000 (00:41 -0700)
clientserver.c
io.c
options.c

index e5a631a399d374002e43b38e0478eb5d1b026e8a..a6c24cf38ee810d2e1e330acb591b56e5a09f7bc 100644 (file)
@@ -965,7 +965,7 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
                        }
                        if (*err_msg)
                                rprintf(FERROR, "%s\n", err_msg);
-                       io_flush(FULL_FLUSH);
+                       io_flush(MSG_FLUSH);
                } else
                        option_error();
                msleep(400);
diff --git a/io.c b/io.c
index 947daa635d3ef8ede51758dc19f25cae195b68d8..e6cfbbda208ceaf7d14cab99cab6e68e0ed1561e 100644 (file)
--- a/io.c
+++ b/io.c
@@ -1982,14 +1982,14 @@ static void sleep_for_bwlimit(int bytes_written)
        total_written = (sleep_usec - elapsed_usec) * bwlimit / (ONE_SEC/1024);
 }
 
-void io_flush(int flush_it_all)
+void io_flush(int flush_type)
 {
        if (iobuf.out.len > iobuf.out_empty_len) {
-               if (flush_it_all == FULL_FLUSH)        /* flush everything in the output buffers */
+               if (flush_type == FULL_FLUSH)           /* flush everything in the output buffers */
                        perform_io(iobuf.out.size - iobuf.out_empty_len, PIO_NEED_OUTROOM);
-               else if (flush_it_all == NORMAL_FLUSH) /* flush at least 1 byte */
+               else if (flush_type == NORMAL_FLUSH)    /* flush at least 1 byte */
                        perform_io(iobuf.out.size - iobuf.out.len + 1, PIO_NEED_OUTROOM);
-                                                      /* MSG_FLUSH: flush iobuf.msg only */
+                                                       /* MSG_FLUSH: flush iobuf.msg only */
        }
        if (iobuf.msg.len)
                perform_io(iobuf.msg.size, PIO_NEED_MSGROOM);
index 1650780e11fe9466037eafc1233759708d7624ea..6a7e7aac1f6d1de7a7352560a4c5851e3e288776 100644 (file)
--- a/options.c
+++ b/options.c
@@ -1200,7 +1200,7 @@ void option_error(void)
        }
 
        rprintf(FERROR, RSYNC_NAME ": %s", err_buf);
-       io_flush(FULL_FLUSH);
+       io_flush(MSG_FLUSH);
        msleep(20);
 }