Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Describe symbolic link handling when writing to a "use chroot = no" module.
[rsync/rsync.git]
/
io.c
diff --git
a/io.c
b/io.c
index
aefd3ef
..
6cdbe6b
100644
(file)
--- a/
io.c
+++ b/
io.c
@@
-364,8
+364,6
@@
static void writefd_unbuffered(int fd,char *buf,int len)
if (FD_ISSET(fd, &w_fds)) {
int ret, n = len-total;
if (FD_ISSET(fd, &w_fds)) {
int ret, n = len-total;
- if (n > PIPE_BUF) n = PIPE_BUF;
-
ret = write(fd,buf+total,n?n:1);
if (ret == -1 && errno == EINTR) {
ret = write(fd,buf+total,n?n:1);
if (ret == -1 && errno == EINTR) {
@@
-409,8
+407,8
@@
static void mplex_write(int fd, enum logcode code, char *buf, int len)
SIVAL(buffer, 0, ((MPLEX_BASE + (int)code)<<24) + len);
SIVAL(buffer, 0, ((MPLEX_BASE + (int)code)<<24) + len);
- if (n > (sizeof(buf)-4)) {
- n = sizeof(buf)-4;
+ if (n > (sizeof(buf
fer
)-4)) {
+ n = sizeof(buf
fer
)-4;
}
memcpy(&buffer[4], buf, n);
}
memcpy(&buffer[4], buf, n);
@@
-419,7
+417,9
@@
static void mplex_write(int fd, enum logcode code, char *buf, int len)
len -= n;
buf += n;
len -= n;
buf += n;
- writefd_unbuffered(fd, buf, len);
+ if (len) {
+ writefd_unbuffered(fd, buf, len);
+ }
}
}
@@
-429,7
+429,7
@@
void io_flush(void)
if (!io_buffer_count || no_flush) return;
if (io_multiplexing_out) {
if (!io_buffer_count || no_flush) return;
if (io_multiplexing_out) {
- mplex_write(fd,
0
, io_buffer, io_buffer_count);
+ mplex_write(fd,
FNONE
, io_buffer, io_buffer_count);
} else {
writefd_unbuffered(fd, io_buffer, io_buffer_count);
}
} else {
writefd_unbuffered(fd, io_buffer, io_buffer_count);
}
@@
-599,3
+599,4
@@
void io_close_input(int fd)
{
buffer_f_in = -1;
}
{
buffer_f_in = -1;
}
+