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
damn!
[rsync/rsync.git]
/
io.c
diff --git
a/io.c
b/io.c
index
f948147
..
540ef2a
100644
(file)
--- a/
io.c
+++ b/
io.c
@@
-407,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);
@@
-417,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);
+ }
}
}