summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2000-01-29 04:50:01 +0000
committerAndrew Tridgell <tridge@samba.org>2000-01-29 04:50:01 +0000
commit6d7b6081ac4c224f571fb7e90d437e3c118fae6c (patch)
tree27a36cd1f7ff669839dac99c9f1f762ef7a71d3f /io.c
parent31b7d79afe59368a3bbee53e429db920ae7042bd (diff)
downloadrsync-6d7b6081ac4c224f571fb7e90d437e3c118fae6c.tar.gz
damn!
the last pre-release had a bug that didn't setup the multiplexing correctly. This means that pre-release will get "unexpected tag -7" whenm talking to the fixed code.
Diffstat (limited to 'io.c')
-rw-r--r--io.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/io.c b/io.c
index f948147e..540ef2ab 100644
--- 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);
- if (n > (sizeof(buf)-4)) {
- n = sizeof(buf)-4;
+ if (n > (sizeof(buffer)-4)) {
+ n = sizeof(buffer)-4;
}
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;
- writefd_unbuffered(fd, buf, len);
+ if (len) {
+ writefd_unbuffered(fd, buf, len);
+ }
}