Use a varint when sending the error_code.
authorWayne Davison <wayned@samba.org>
Wed, 14 Jan 2009 18:18:47 +0000 (10:18 -0800)
committerWayne Davison <wayned@samba.org>
Sat, 17 Jan 2009 22:52:13 +0000 (14:52 -0800)
flist.c
rsync.h

diff --git a/flist.c b/flist.c
index 2e449c0..3e79ce1 100644 (file)
--- a/flist.c
+++ b/flist.c
@@ -1915,7 +1915,7 @@ void send_extra_file_list(int f, int at_least)
                        write_byte(f, 0);
                else {
                        write_shortint(f, XMIT_EXTENDED_FLAGS|XMIT_IO_ERROR_ENDLIST);
                        write_byte(f, 0);
                else {
                        write_shortint(f, XMIT_EXTENDED_FLAGS|XMIT_IO_ERROR_ENDLIST);
-                       write_int(f, io_error);
+                       write_varint(f, io_error);
                }
 
                if (need_unsorted_flist) {
                }
 
                if (need_unsorted_flist) {
@@ -2218,7 +2218,7 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
                write_byte(f, 0);
        else {
                write_shortint(f, XMIT_EXTENDED_FLAGS|XMIT_IO_ERROR_ENDLIST);
                write_byte(f, 0);
        else {
                write_shortint(f, XMIT_EXTENDED_FLAGS|XMIT_IO_ERROR_ENDLIST);
-               write_int(f, io_error);
+               write_varint(f, io_error);
        }
 
 #ifdef SUPPORT_HARD_LINKS
        }
 
 #ifdef SUPPORT_HARD_LINKS
@@ -2341,7 +2341,7 @@ struct file_list *recv_file_list(int f)
                                rprintf(FERROR, "Invalid flist flag: %x\n", flags);
                                exit_cleanup(RERR_PROTOCOL);
                        }
                                rprintf(FERROR, "Invalid flist flag: %x\n", flags);
                                exit_cleanup(RERR_PROTOCOL);
                        }
-                       err = read_int(f);
+                       err = read_varint(f);
                        if (!ignore_errors)
                                io_error |= err;
                        break;
                        if (!ignore_errors)
                                io_error |= err;
                        break;
diff --git a/rsync.h b/rsync.h
index d6384f8..70da486 100644 (file)
--- a/rsync.h
+++ b/rsync.h
@@ -96,7 +96,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 (and NEVER before)! */
 /* 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 (and NEVER before)! */
-#define SUBPROTOCOL_VERSION 4
+#define SUBPROTOCOL_VERSION 5
 
 /* 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
 
 /* 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