You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

51 lines
2.3 KiB

Index: compat.c
--- compat.c.orig 2006-04-26 01:51:12 +0200
+++ compat.c 2006-11-08 09:09:06 +0100
@@ -54,19 +54,21 @@
rprintf(FINFO, "(%s) Protocol versions: remote=%d, negotiated=%d\n",
am_server? "Server" : "Client", remote_protocol, protocol_version);
}
- if (remote_protocol < MIN_PROTOCOL_VERSION
- || remote_protocol > MAX_PROTOCOL_VERSION) {
+ if ( ( am_server && (remote_protocol < MIN_CLIENT_PROTOCOL_VERSION || remote_protocol > MAX_CLIENT_PROTOCOL_VERSION))
+ || (!am_server && (remote_protocol < MIN_SERVER_PROTOCOL_VERSION || remote_protocol > MAX_SERVER_PROTOCOL_VERSION))) {
rprintf(FERROR,"protocol version mismatch -- is your shell clean?\n");
rprintf(FERROR,"(see the rsync man page for an explanation)\n");
exit_cleanup(RERR_PROTOCOL);
}
- if (remote_protocol < OLD_PROTOCOL_VERSION) {
- rprintf(FINFO,"%s is very old version of rsync, upgrade recommended.\n",
- am_server? "Client" : "Server");
+ if ( ( am_server && remote_protocol < OLD_CLIENT_PROTOCOL_VERSION)
+ || (!am_server && remote_protocol < OLD_SERVER_PROTOCOL_VERSION)) {
+ rprintf(FINFO,"%s is very old version (protocol %d) of rsync, upgrade recommended.\n",
+ am_server? "Client" : "Server", remote_protocol);
}
- if (protocol_version < MIN_PROTOCOL_VERSION) {
+ if ( ( am_server && protocol_version < MIN_SERVER_PROTOCOL_VERSION)
+ || (!am_server && protocol_version < MIN_CLIENT_PROTOCOL_VERSION)) {
rprintf(FERROR, "--protocol must be at least %d on the %s.\n",
- MIN_PROTOCOL_VERSION, am_server? "Server" : "Client");
+ am_server ? MIN_SERVER_PROTOCOL_VERSION : MIN_CLIENT_PROTOCOL_VERSION, am_server? "Server" : "Client");
exit_cleanup(RERR_PROTOCOL);
}
if (protocol_version > PROTOCOL_VERSION) {
Index: rsync.h
--- rsync.h.orig 2006-10-24 05:31:30 +0200
+++ rsync.h 2006-11-08 09:09:06 +0100
@@ -86,9 +86,12 @@
* unlikely to begin by sending a byte between MIN_PROTOCL_VERSION and
* MAX_PROTOCOL_VERSION. */
-#define MIN_PROTOCOL_VERSION 20
-#define OLD_PROTOCOL_VERSION 25
-#define MAX_PROTOCOL_VERSION 40
+#define MIN_SERVER_PROTOCOL_VERSION 20
+#define OLD_SERVER_PROTOCOL_VERSION 25
+#define MAX_SERVER_PROTOCOL_VERSION 40
+#define MIN_CLIENT_PROTOCOL_VERSION 25
+#define OLD_CLIENT_PROTOCOL_VERSION 27
+#define MAX_CLIENT_PROTOCOL_VERSION 40
#define RSYNC_PORT 873