Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
935b920
)
indent -kr -i8
author
Martin Pool
<mbp@samba.org>
Wed, 23 Jan 2002 07:34:26 +0000
(07:34 +0000)
committer
Martin Pool
<mbp@samba.org>
Wed, 23 Jan 2002 07:34:26 +0000
(07:34 +0000)
io.c
patch
|
blob
|
blame
|
history
diff --git
a/io.c
b/io.c
index
95fb73b
..
6085745
100644
(file)
--- a/
io.c
+++ b/
io.c
@@
-256,7
+256,7
@@
static void read_loop (int fd, char *buf, size_t len)
static int read_unbuffered(int fd, char *buf, size_t len)
{
static int remaining;
static int read_unbuffered(int fd, char *buf, size_t len)
{
static int remaining;
- int tag, ret
=
0;
+ int tag, ret
=
0;
char line[1024];
if (!io_multiplexing_in || fd != multiplex_in_fd)
char line[1024];
if (!io_multiplexing_in || fd != multiplex_in_fd)
@@
-271,23
+271,24
@@
static int read_unbuffered(int fd, char *buf, size_t len)
continue;
}
continue;
}
- read_loop
(fd, line, 4);
+ read_loop(fd, line, 4);
tag = IVAL(line, 0);
remaining = tag & 0xFFFFFF;
tag = tag >> 24;
tag = IVAL(line, 0);
remaining = tag & 0xFFFFFF;
tag = tag >> 24;
- if (tag == MPLEX_BASE) continue;
+ if (tag == MPLEX_BASE)
+ continue;
tag -= MPLEX_BASE;
if (tag != FERROR && tag != FINFO) {
tag -= MPLEX_BASE;
if (tag != FERROR && tag != FINFO) {
- rprintf(FERROR,"unexpected tag %d\n", tag);
+ rprintf(FERROR,
"unexpected tag %d\n", tag);
exit_cleanup(RERR_STREAMIO);
}
exit_cleanup(RERR_STREAMIO);
}
- if (remaining > sizeof(line)
-
1) {
- rprintf(FERROR,
"multiplexing overflow %d\n\n",
+ if (remaining > sizeof(line)
-
1) {
+ rprintf(FERROR,
"multiplexing overflow %d\n\n",
remaining);
exit_cleanup(RERR_STREAMIO);
}
remaining);
exit_cleanup(RERR_STREAMIO);
}
@@
-295,7
+296,7
@@
static int read_unbuffered(int fd, char *buf, size_t len)
read_loop(fd, line, remaining);
line[remaining] = 0;
read_loop(fd, line, remaining);
line[remaining] = 0;
- rprintf((enum logcode)
tag,
"%s", line);
+ rprintf((enum logcode)
tag,
"%s", line);
remaining = 0;
}
remaining = 0;
}
@@
-303,6
+304,7
@@
static int read_unbuffered(int fd, char *buf, size_t len)
}
}
+
/* do a buffered read from fd. don't return until all N bytes
have been read. If all N can't be read then exit with an error */
static void readfd (int fd, char *buffer, size_t N)
/* do a buffered read from fd. don't return until all N bytes
have been read. If all N can't be read then exit with an error */
static void readfd (int fd, char *buffer, size_t N)