Wayne Davison
188fed9570
Moved read_sum_head() here from sender.c (because the generator uses it
...
too) and improved it with better error checking.
2005-01-17 22:51:24 +00:00
Wayne Davison
bd9fca4708
For the "unexpected tag" or "multiplexing overflow" messages, we
...
now output who_am_i() so we know who had the problem.
2005-01-14 18:17:32 +00:00
Wayne Davison
ef0c03ff70
The code that tries to read an error from the socket in an abnormal-
...
exit situation was properly forcing the io_timeout value down to 30
seconds, but failing to set the select_timeout value.
2004-12-31 00:39:59 +00:00
Wayne Davison
98f8c9a5e5
Some minor improvements to read_msg_fd() made it safe to use both
...
set_msg_fd_in() and read_msg_fd() during the early phase of being
a client sender (up through the sending of the file list). This
makes sure that the sender monitors the socket from the receiver
for any messages that it might send to us, and thus avoids a hang
when verbosity is high.
2004-11-20 07:07:37 +00:00
Wayne Davison
41cfde6be3
Checking in the g2r-basis-filename patch that ensures that the receiver
...
uses the same basis file that the generator used (avoiding a duplicate
check that could cause a hang if a compare-dest file was a named pipe).
2004-11-03 20:30:31 +00:00
Wayne Davison
dca68b0aad
- Changed "read so far" to "received so far".
...
- Output the who_am_i() information in the socket read/write errors to
make it a little clearer who is complaining about what (for those
familiar with rsync, at least -- e.g. it will help when users report
errors).
2004-08-02 02:43:54 +00:00
Wayne Davison
7f459268d9
Added close_multiplexing_in() and renamed io_multiplexing_close()
...
to close_multiplexing_out().
2004-07-29 07:24:45 +00:00
Wayne Davison
d1b31da71e
If we fail writing to the socket and we're receiving error messages
...
from the other side via a multiplexed input, read the socket to see
if we get some errors that would explain why they went away.
2004-07-29 07:09:46 +00:00
Wayne Davison
741d654495
Call write_stream_flags() from start_write_batch().
2004-07-24 16:39:53 +00:00
Wayne Davison
28deecca55
Changed NO_INT64 to INT64_IS_OFF_T because off_t might actually be
...
64 bits. The code now only complains if int64 is really too short.
2004-07-22 19:28:45 +00:00
Wayne Davison
b0ad542928
Added batch_gen_fd.
2004-07-21 23:59:28 +00:00
Wayne Davison
cf338ab1be
Made write_sbuf() non-static.
2004-07-20 16:57:18 +00:00
Wayne Davison
93095cbe99
A very minor optimization was made to read_sbuf(), read_byte(),
...
write_sbuf(), and write_byte().
2004-07-17 21:17:34 +00:00
Wayne Davison
1f75bb1066
Revamped some of the io variables and calls to make the various I/O
...
functions seemlessly work on fds that aren't for the main socket. This
involved changing some fd-variable names (to make them clearer), adding
io_set_sock_fds(), and making input buffering have a better enabled
flag (via an allocated buffer, just like the output buffering). I also
got rid of the fd arg to some functions where the fd arg could only
specify the input or output fd for the socket (which we already know).
2004-07-17 15:20:00 +00:00
Wayne Davison
b9f592fbf5
My modified version of Chris Shoemaker's improved batch-file handling.
2004-07-15 02:20:08 +00:00
Wayne Davison
a7026ba90a
Fixed a newly-introduced problem in read_timeout() where FD_ZERO(&w_fds)
...
wasn't always called before w_fds was used.
2004-06-23 01:13:09 +00:00
Wayne Davison
bd717af8ab
Must not call check_timeout() before checking the errno value.
2004-06-19 07:09:57 +00:00
Wayne Davison
c399d22a19
Renamed read_unbuffered() to readfd_unbuffered() so that it matches
...
writefd_unbuffered().
2004-06-09 03:07:50 +00:00
Wayne Davison
1ea087a794
- Made the maximum-fd computation prior to a select() use the same idiom
...
in both the read and write code (also use a better variable name).
- Made the bytes-available code at the end of the select() loop use the
same flow of control in the read and the write code.
2004-06-08 22:18:04 +00:00
Wayne Davison
00bdf89977
Improved a comment in read_msg_fd() and made the byte-reading code
...
in read_timeout() a little better.
2004-06-08 16:23:54 +00:00
Wayne Davison
f9c6b3e7d6
Increase the size of the message-receving buffer for error
...
messages sent from the receiver to the generator.
2004-06-07 22:47:01 +00:00
Wayne Davison
4033b80b51
- Got rid of some useless calls to msg_list_push().
...
- Added a couple checks to ensure that the receiver doesn't mix two
clashing kinds of writes on the msg_fd_out pipe.
- Made sure that the read code in the receiver flushes the msg_fd_out
pipe, if needed.
2004-06-06 19:15:58 +00:00
Wayne Davison
e626b29e10
Make sure our select calls don't sleep for over one minute at a time,
...
even when io_timeout is a longer value (though the code in options.c
might set it to a shorter value if io_timeout is small).
2004-06-06 19:02:09 +00:00
Wayne Davison
f89b936801
Don't use single-line "if (condition) statement;" idiom.
2004-06-06 18:36:22 +00:00
Wayne Davison
71e586304b
Improvements to make --bwlimit work better.
2004-05-27 22:09:31 +00:00
Wayne Davison
d62bcc17f3
Changed rprintf() calls that included strerror() to use rsyserr().
2004-05-15 19:31:10 +00:00
Wayne Davison
6ed6d7f5a8
Improved the function comments for read_line() and slightly tweaked
...
its code. Also changed "IO" to "I/O" in various comments.
2004-05-08 18:03:43 +00:00
Wayne Davison
13c7bcbb2b
Output an error before we die if we get a wacko message from the receiver.
2004-01-16 16:31:47 +00:00
Wayne Davison
d17e1dd2da
- Moved the err_list* stuff here from log.c and renamed them msg_list*.
...
- Renamed log_error_fd to msg_fd_out, and io_error_fd to msg_fd_in.
- Added a redo_list* to keep track of any redo items that come over
the message channel from the receiver to the generator.
- The io_flush() and msg_list_push() functions now take an arg:
NORMAL_FLUSH or FULL_FLUSH. The latter ensures that we don't lose
any log messages that haven't gotten written from the msg_list.
- Added a send_msg() function that log.c calls to send any remote
log messages. It is also called to send the new MSG_REDO and
MSG_DONE messages.
2004-01-15 07:42:17 +00:00
Wayne Davison
3309507dd3
Some minor changes to some if statements.
2004-01-02 08:33:57 +00:00
Wayne Davison
76c2194714
Applying my updated version of Craig Barratt's buffered I/O patch.
2004-01-02 08:29:49 +00:00
Wayne Davison
6b45fcf160
Undid previous change.
2003-12-26 23:04:01 +00:00
Wayne Davison
49c24eccd4
A change that wasn't needed.
2003-12-26 22:59:53 +00:00
Wayne Davison
55bf051bbc
Getting rid of an extra newline that accidentally crept into the code.
2003-12-24 01:46:07 +00:00
Wayne Davison
55d5937dd6
Simplified the setting of the reading_remotely variable in function
...
read_filesfrom_line() now that remote_filesfrom_file is set more
often.
2003-12-15 00:54:44 +00:00
Wayne Davison
58cadc8608
Merged in the security fixes from 2.5.7.
2003-12-06 21:07:27 +00:00
Wayne Davison
3151cbae89
Some superficial tweaks I made while reading through the io.c code.
2003-07-26 17:55:07 +00:00
Wayne Davison
8801138b47
Made rprintf() of size_t value portable.
2003-07-04 15:11:44 +00:00
J.W. Schultz
91c4da3fda
versions prior to 1.7.0 (protcol version 17) cannot talk to
...
protocol versions > 20 so bumping up the minimum protocol
version and excising the pre-17 cruft.
2003-04-10 00:13:48 +00:00
Wayne Davison
56014c8c0a
Support the new --files-from and --from0 options.
2003-03-30 23:00:35 +00:00
J.W. Schultz
67863f46e3
Warn if 64bit value sent or received on system that doesn't
...
support 64bit integers.
2003-03-25 07:13:40 +00:00
Martin Pool
c979dad54a
Fix old typo.
2002-04-11 02:11:50 +00:00
Martin Pool
a86179f429
Fix type error.
2002-04-09 05:32:52 +00:00
Martin Pool
805edf9d7d
A bit more support for IO phase names.
2002-04-09 05:00:03 +00:00
Martin Pool
eca2adb4b3
OK, we can now get phase messages if we fail in send_file_entry
2002-04-09 04:50:25 +00:00
Martin Pool
98b332edea
Fix typo.
...
Show io phase name in error message.
2002-04-09 04:41:03 +00:00
Martin Pool
e681e82066
Rather than a loop subtracting 1e6 to convert usecs to secs/usecs, just
...
use div/mod.
2002-04-09 04:33:32 +00:00
Martin Pool
08571358b1
Factor out bwlimit sleep code from writefd_unbuffered into its own function.
2002-04-09 04:29:46 +00:00
Martin Pool
8901a07fdb
Clarify "error writing %d bytes" message.
2002-04-09 04:23:18 +00:00
Martin Pool
880da0072e
Clean up docs.
2002-04-09 04:20:36 +00:00