aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2005-12-08 21:19:22 +0000
committerWayne Davison <wayned@samba.org>2005-12-08 21:19:22 +0000
commit37f35d89d11d5ca8beadcb946dcd2e545d58b171 (patch)
treed3c798fbc63b5396f64b81a67b598270960b406b /io.c
parent08c88178aaa9e9ccdfc3bf7ea30ffaa27906f68c (diff)
downloadandroid_external_rsync-37f35d89d11d5ca8beadcb946dcd2e545d58b171.tar.gz
android_external_rsync-37f35d89d11d5ca8beadcb946dcd2e545d58b171.tar.bz2
android_external_rsync-37f35d89d11d5ca8beadcb946dcd2e545d58b171.zip
Made msg_list_push() static and renamed it to msg_list_flush().
Diffstat (limited to 'io.c')
-rw-r--r--io.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/io.c b/io.c
index b9668af4..07909fe4 100644
--- a/io.c
+++ b/io.c
@@ -244,16 +244,6 @@ static void msg_list_add(int code, char *buf, int len)
msg_list.tail = ml;
}
-void send_msg(enum msgcode code, char *buf, int len)
-{
- if (msg_fd_out < 0) {
- io_multiplex_write(code, buf, len);
- return;
- }
- msg_list_add(code, buf, len);
- msg_list_push(NORMAL_FLUSH);
-}
-
/* Read a message from the MSG_* fd and handle it. This is called either
* during the early stages of being a local sender (up through the sending
* of the file list) or when we're the generator (to fetch the messages
@@ -333,7 +323,7 @@ static void read_msg_fd(void)
/* Try to push messages off the list onto the wire. If we leave with more
* to do, return 0. On error, return -1. If everything flushed, return 1.
* This is only active in the receiver. */
-int msg_list_push(int flush_it_all)
+static int msg_list_flush(int flush_it_all)
{
static int written = 0;
struct timeval tv;
@@ -370,6 +360,16 @@ int msg_list_push(int flush_it_all)
return 1;
}
+void send_msg(enum msgcode code, char *buf, int len)
+{
+ if (msg_fd_out < 0) {
+ io_multiplex_write(code, buf, len);
+ return;
+ }
+ msg_list_add(code, buf, len);
+ msg_list_flush(NORMAL_FLUSH);
+}
+
int get_redo_num(int itemizing, enum logcode code)
{
while (1) {
@@ -503,7 +503,7 @@ static int read_timeout(int fd, char *buf, size_t len)
}
if (msg_list.head && FD_ISSET(msg_fd_out, &w_fds))
- msg_list_push(NORMAL_FLUSH);
+ msg_list_flush(NORMAL_FLUSH);
if (io_filesfrom_f_out >= 0) {
if (io_filesfrom_buflen) {
@@ -1148,7 +1148,7 @@ static void mplex_write(enum msgcode code, char *buf, size_t len)
void io_flush(int flush_it_all)
{
- msg_list_push(flush_it_all);
+ msg_list_flush(flush_it_all);
if (!iobuf_out_cnt || no_flush)
return;