From 753849fdbcf8df0a408135be469f620bb74f2ab5 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Sat, 21 Apr 2007 19:32:46 +0000 Subject: [PATCH] Batch files need to be written with the new subprotocol value for protocol 30. --- compat.c | 2 +- io.c | 5 +++++ rsync.h | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/compat.c b/compat.c index 4b57ec48..0cfb78f7 100644 --- a/compat.c +++ b/compat.c @@ -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); diff --git a/io.c b/io.c index a7603ff8..571f1ff7 100644 --- a/io.c +++ b/io.c @@ -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) diff --git a/rsync.h b/rsync.h index eccbce02..5bb155e8 100644 --- a/rsync.h +++ b/rsync.h @@ -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 -- 2.34.1