mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-10-24 14:48:16 -04:00
Batch files need to be written with the new subprotocol value
for protocol 30.
This commit is contained in:
1 parent
bb25779de7
commit
753849fdbc
3 files changed
+7
-2
No files matched your search
@@ -77,7 +77,7 @@ void setup_protocol(int f_out,int f_in)
|
||||
protocol_version = remote_protocol;
|
||||
/* CVS support: fallback to finalized protocol if incompatible */
|
||||
if (protocol_version >= 30) {
|
||||
int theirsub, oursub = PROTOCOL_SUBVERSION;
|
||||
int theirsub, oursub = SUBPROTOCOL_VERSION;
|
||||
if (!read_batch)
|
||||
write_varint(f_out, oursub);
|
||||
theirsub = read_varint(f_in);
|
||||
|
||||
@@ -1715,6 +1715,11 @@ void start_write_batch(int fd)
|
||||
* actual communication so far depends on whether a daemon
|
||||
* is involved. */
|
||||
write_int(batch_fd, protocol_version);
|
||||
if (protocol_version >= 30) {
|
||||
int sub = protocol_version == PROTOCOL_VERSION
|
||||
? SUBPROTOCOL_VERSION : 0;
|
||||
write_varint(batch_fd, sub);
|
||||
}
|
||||
write_int(batch_fd, checksum_seed);
|
||||
|
||||
if (am_sender)
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
/* This is used when working on a new protocol version in CVS, and should
|
||||
* be a new non-zero value for each CVS change that affects the protocol.
|
||||
* It must ALWAYS be 0 when the protocol goes final! */
|
||||
#define PROTOCOL_SUBVERSION 1
|
||||
#define SUBPROTOCOL_VERSION 1
|
||||
|
||||
/* We refuse to interoperate with versions that are not in this range.
|
||||
* Note that we assume we'll work with later versions: the onus is on
|
||||
|
||||
Reference in new issue
Block a user