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
Made hard_link_check() compile when SUPPORT_HARD_LINKS isn't enabled.
[rsync/rsync.git]
/
io.c
diff --git
a/io.c
b/io.c
index
13f4d3d
..
421571a
100644
(file)
--- a/
io.c
+++ b/
io.c
@@
-380,6
+380,7
@@
static int read_timeout(int fd, char *buf, size_t len)
int count;
FD_ZERO(&r_fds);
int count;
FD_ZERO(&r_fds);
+ FD_ZERO(&w_fds);
FD_SET(fd, &r_fds);
if (msg_fd_in >= 0) {
FD_SET(msg_fd_in, &r_fds);
FD_SET(fd, &r_fds);
if (msg_fd_in >= 0) {
FD_SET(msg_fd_in, &r_fds);
@@
-401,7
+402,6
@@
static int read_timeout(int fd, char *buf, size_t len)
new_fd = -1;
}
} else {
new_fd = -1;
}
} else {
- FD_ZERO(&w_fds);
FD_SET(io_filesfrom_f_out, &w_fds);
new_fd = io_filesfrom_f_out;
}
FD_SET(io_filesfrom_f_out, &w_fds);
new_fd = io_filesfrom_f_out;
}
@@
-414,14
+414,12
@@
static int read_timeout(int fd, char *buf, size_t len)
errno = 0;
errno = 0;
- count = select(maxfd + 1, &r_fds,
- io_filesfrom_buflen? &w_fds : NULL,
- NULL, &tv);
+ count = select(maxfd + 1, &r_fds, &w_fds, NULL, &tv);
if (count <= 0) {
if (count <= 0) {
- check_timeout();
if (errno == EBADF)
exit_cleanup(RERR_SOCKETIO);
if (errno == EBADF)
exit_cleanup(RERR_SOCKETIO);
+ check_timeout();
continue;
}
continue;
}
@@
-827,9
+825,9
@@
static void writefd_unbuffered(int fd,char *buf,size_t len)
&w_fds, NULL, &tv);
if (count <= 0) {
&w_fds, NULL, &tv);
if (count <= 0) {
- check_timeout();
if (count < 0 && errno == EBADF)
exit_cleanup(RERR_SOCKETIO);
if (count < 0 && errno == EBADF)
exit_cleanup(RERR_SOCKETIO);
+ check_timeout();
continue;
}
continue;
}