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
Fixed a newly-introduced problem in read_timeout() where FD_ZERO(&w_fds)
[rsync/rsync.git]
/
io.c
diff --git
a/io.c
b/io.c
index
ef4735c
..
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,9
+414,7
@@
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 (errno == EBADF)
if (count <= 0) {
if (errno == EBADF)