versions prior to 1.7.0 (protcol version 17) cannot talk to
authorJ.W. Schultz <jw@samba.org>
Thu, 10 Apr 2003 00:13:48 +0000 (00:13 +0000)
committerJ.W. Schultz <jw@samba.org>
Thu, 10 Apr 2003 00:13:48 +0000 (00:13 +0000)
protocol versions > 20 so bumping up the minimum protocol
version and excising the pre-17 cruft.

OLDNEWS
flist.c
io.c
rsync.h

diff --git a/OLDNEWS b/OLDNEWS
index 355e1ec159d4442ff8e29cf13959ab9be912de3e..288ec78213e2c639b6d67e62f184b7b6e78f433e 100644 (file)
--- a/OLDNEWS
+++ b/OLDNEWS
@@ -302,17 +302,20 @@ protocol: 25 (changed)
       build farm.
 \f
 Partial Protocol History
-       DATE OF COMMIT*         RELEASE         PROTOCL VERSION
+       DATE                    RELEASE         PROTOCOL
        2003/01/26 20:11:16     release-2-5-6   26      
        2002/02/23 00:17:50     release-2-5-3   26      
        2002/01/25 23:00:21     release-2-5-2   26      
        2001/12/18 06:47:40     release-2-5-1   25      
+                               release-2-4-6   24      
        2000/08/16 08:34:18     release-2-4-5   24      
        2000/07/29 04:52:05     release-2-4-4   24      
        2000/03/30 14:15:00     release-2-4-2   24      
        2000/01/29 23:49:36     release-2-4-1   24      
        2000/01/29 02:56:37     release-2-4-0   23      
+                               release-2-3-3   21      
        1999/06/26 01:06:38     release-2-3-2   21      
+                               release-2-3-1   20      
        1999/03/15 21:17:59     release-2-3-0   20      
        1998/11/15 01:21:42     release-2-2-1   19      
        1998/11/03 07:08:28     release-2-2-0   19      
@@ -330,8 +333,8 @@ Partial Protocol History
        1998/05/13 15:44:11     release-2-0-0   17      
        1998/04/17 06:07:26     release-1-7-4   17      
        1998/04/05 06:43:55     release-1-7-2   17      
-       1998/03/26 04:18:57     release-1-7-0   17      
-       1998/01/13 15:57:32     release-1-6-9   15      
+       1998/03/26 04:18:57     release-1-7-0   17 MAX=30
+       1998/01/13 15:57:32     release-1-6-9   15 MAX=20
        1997/12/17 11:07:30     release-1-6-7   14      
        1997/12/15 18:36:21     release-1-6-4   14      
 
diff --git a/flist.c b/flist.c
index 2fff9cf1d2cd084bb72dbb99de08013a03cfc51c..cd5aa149c402aeba7a4c5eb21be59c5d29a3beee 100644 (file)
--- a/flist.c
+++ b/flist.c
@@ -1046,8 +1046,8 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
                send_uid_list(f);
        }
 
-       /* if protocol version is >= 17 then send the io_error flag */
-       if (f != -1 && remote_version >= 17) {
+       /* send the io_error flag */
+       if (f != -1) {
                extern int module_id;
                write_int(f, lp_ignore_errors(module_id) ? 0 : io_error);
        }
@@ -1126,8 +1126,8 @@ struct file_list *recv_file_list(int f)
                recv_uid_list(f, flist);
        }
 
-       /* if protocol version is >= 17 then recv the io_error flag */
-       if (f != -1 && remote_version >= 17 && !read_batch) {   /* dw-added readbatch */
+       /* recv the io_error flag */
+       if (f != -1 && !read_batch) {   /* dw-added readbatch */
                extern int module_id;
                extern int ignore_errors;
                if (lp_ignore_errors(module_id) || ignore_errors) {
diff --git a/io.c b/io.c
index f6302fc20bc18be3255ca6debb349456963d0245..117a9d6257107b95ee275f7007ef6d3f54feec14 100644 (file)
--- a/io.c
+++ b/io.c
@@ -524,7 +524,6 @@ int32 read_int(int f)
 
 int64 read_longint(int f)
 {
-       extern int remote_version;
        int64 ret;
        char b[8];
        ret = read_int(f);
@@ -537,10 +536,8 @@ int64 read_longint(int f)
        rprintf(FERROR,"Integer overflow - attempted 64 bit offset\n");
        exit_cleanup(RERR_UNSUPPORTED);
 #else
-       if (remote_version >= 16) {
-               readfd(f,b,8);
-               ret = IVAL(b,0) | (((int64)IVAL(b,4))<<32);
-       }
+       readfd(f,b,8);
+       ret = IVAL(b,0) | (((int64)IVAL(b,4))<<32);
 #endif
 
        return ret;
@@ -797,10 +794,9 @@ void write_int_named(int f, int32 x, const char *phase)
  */
 void write_longint(int f, int64 x)
 {
-       extern int remote_version;
        char b[8];
 
-       if (remote_version < 16 || x <= 0x7FFFFFFF) {
+       if (x <= 0x7FFFFFFF) {
                write_int(f, (int)x);
                return;
        }
diff --git a/rsync.h b/rsync.h
index d897b3d69216a6e3bdc35ff91f87b2237f35c2ad..85fce14e7a23ca7a41af7d1d429b8f30c863cde6 100644 (file)
--- a/rsync.h
+++ b/rsync.h
  * the old protocol will become the minimum and
  * compatibility code removed.
  *
- * There are two possible explanations for the limit at thirty: either
- * to allow new major-rev versions that do not interoperate with us,
- * and (more likely) so that we can detect an attempt to connect rsync
- * to a non-rsync server, which is unlikely to begin by sending a byte
- * between 15 and 30. */
-#define MIN_PROTOCOL_VERSION 15
+ * There are two possible explanations for the limit at
+ * MAX_PROTOCOL_VERSION: either to allow new major-rev versions that
+ * do not interoperate with us, and (more likely) so that we can
+ * detect an attempt to connect rsync to a non-rsync server, which is
+ * unlikely to begin by sending a byte between MIN_PROTOCL_VERSION and
+ * MAX_PROTOCOL_VERSION. */
+
+#define MIN_PROTOCOL_VERSION 17
 #define OLD_PROTOCOL_VERSION 20
 #define MAX_PROTOCOL_VERSION 40