aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2004-11-03 20:30:31 +0000
committerWayne Davison <wayned@samba.org>2004-11-03 20:30:31 +0000
commit41cfde6be388364f9bf7dfa9a532625b1f660df7 (patch)
tree370426ef03ae752f333345589f9a68cd83420fea /io.c
parent34bde8d54af97d339f3cb8d8343566bcdb2a1e5b (diff)
downloadandroid_external_rsync-41cfde6be388364f9bf7dfa9a532625b1f660df7.tar.gz
android_external_rsync-41cfde6be388364f9bf7dfa9a532625b1f660df7.tar.bz2
android_external_rsync-41cfde6be388364f9bf7dfa9a532625b1f660df7.zip
Checking in the g2r-basis-filename patch that ensures that the receiver
uses the same basis file that the generator used (avoiding a duplicate check that could cause a hang if a compare-dest file was a named pipe).
Diffstat (limited to 'io.c')
-rw-r--r--io.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/io.c b/io.c
index 029f74bb..50eca536 100644
--- a/io.c
+++ b/io.c
@@ -857,6 +857,11 @@ static void writefd_unbuffered(int fd,char *buf,size_t len)
if (msg_fd_in > maxfd)
maxfd = msg_fd_in;
}
+ if (fd != sock_f_out && iobuf_out_cnt && no_flush == 1) {
+ FD_SET(sock_f_out, &w_fds);
+ if (sock_f_out > maxfd)
+ maxfd = sock_f_out;
+ }
tv.tv_sec = select_timeout;
tv.tv_usec = 0;
@@ -875,8 +880,14 @@ static void writefd_unbuffered(int fd,char *buf,size_t len)
if (msg_fd_in >= 0 && FD_ISSET(msg_fd_in, &r_fds))
read_msg_fd();
- if (!FD_ISSET(fd, &w_fds))
+ if (!FD_ISSET(fd, &w_fds)) {
+ if (fd != sock_f_out && iobuf_out_cnt) {
+ no_flush--;
+ io_flush(NORMAL_FLUSH);
+ no_flush++;
+ }
continue;
+ }
n = len - total;
if (bwlimit && n > bwlimit_writemax)