diff options
| author | Wayne Davison <wayned@samba.org> | 2005-03-09 18:54:02 +0000 |
|---|---|---|
| committer | Wayne Davison <wayned@samba.org> | 2005-03-09 18:54:02 +0000 |
| commit | 9a6ed83f2c4a455b19b49824d86f5308b45f5c88 (patch) | |
| tree | 004008738a4c6ddc3aa1d1363a467586e2d2968c /io.c | |
| parent | fd84673e54f8464f4fd9ec6a126c56bd5b487efc (diff) | |
| download | android_external_rsync-9a6ed83f2c4a455b19b49824d86f5308b45f5c88.tar.gz android_external_rsync-9a6ed83f2c4a455b19b49824d86f5308b45f5c88.tar.bz2 android_external_rsync-9a6ed83f2c4a455b19b49824d86f5308b45f5c88.zip | |
- Made an overflow in read_vstring() return an error instead of dying.
- Got rid of a flush kluge that was needed for the name-pipe.
Diffstat (limited to 'io.c')
| -rw-r--r-- | io.c | 10 |
1 files changed, 2 insertions, 8 deletions
@@ -888,7 +888,7 @@ int read_vstring(int f, char *buf, int bufsize) if (len >= bufsize) { rprintf(FERROR, "over-long vstring received (%d > %d)\n", len, bufsize - 1); - exit_cleanup(RERR_PROTOCOL); + return -1; } if (len) @@ -1045,14 +1045,8 @@ static void writefd_unbuffered(int fd,char *buf,size_t len) if (msg_fd_in >= 0 && FD_ISSET(msg_fd_in, &r_fds)) read_msg_fd(); - if (!FD_ISSET(fd, &w_fds)) { - if (fd != sock_f_out && iobuf_out_cnt) { - no_flush--; - io_flush(NORMAL_FLUSH); - no_flush++; - } + if (!FD_ISSET(fd, &w_fds)) continue; - } n = len - total; if (bwlimit && n > bwlimit_writemax) |
