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:
a1e13a9
)
cosmetic fix. don't display a EOF error when displaying just the motd
author
Andrew Tridgell
<tridge@samba.org>
Thu, 28 May 1998 01:58:33 +0000
(
01:58
+0000)
committer
Andrew Tridgell
<tridge@samba.org>
Thu, 28 May 1998 01:58:33 +0000
(
01:58
+0000)
from a rsync server
io.c
patch
|
blob
|
blame
|
history
diff --git
a/io.c
b/io.c
index
03da79c
..
e9a66a4
100644
(file)
--- a/
io.c
+++ b/
io.c
@@
-32,10
+32,11
@@
static int io_multiplexing_in;
static int multiplex_in_fd;
static int multiplex_out_fd;
static time_t last_io;
static int multiplex_in_fd;
static int multiplex_out_fd;
static time_t last_io;
-
+static int eof_error=1;
extern int verbose;
extern int io_timeout;
extern int verbose;
extern int io_timeout;
+
int64 write_total(void)
{
return total_written;
int64 write_total(void)
{
return total_written;
@@
-119,7
+120,9
@@
static int read_timeout(int fd, char *buf, int len)
}
if (n == 0) {
}
if (n == 0) {
- rprintf(FERROR,"EOF in read_timeout\n");
+ if (eof_error) {
+ rprintf(FERROR,"EOF in read_timeout\n");
+ }
exit_cleanup(1);
}
exit_cleanup(1);
}
@@
-482,8
+485,12
@@
void write_byte(int f,unsigned char c)
int read_line(int f, char *buf, int maxlen)
{
int read_line(int f, char *buf, int maxlen)
{
+ eof_error = 0;
+
while (maxlen) {
while (maxlen) {
+ buf[0] = 0;
read_buf(f, buf, 1);
read_buf(f, buf, 1);
+ if (buf[0] == 0) return 0;
if (buf[0] == '\n') {
buf[0] = 0;
break;
if (buf[0] == '\n') {
buf[0] = 0;
break;
@@
-497,6
+504,9
@@
int read_line(int f, char *buf, int maxlen)
*buf = 0;
return 0;
}
*buf = 0;
return 0;
}
+
+ eof_error = 1;
+
return 1;
}
return 1;
}