[SCM] The rsync repository. - branch master updated

Rsync CVS commit messages rsync-cvs at lists.samba.org
Wed May 27 05:40:26 UTC 2020


The branch, master has been updated
       via  8809f65b A couple minor tweaks.
      from  5710d2fe Simplify the capabilities array.

https://git.samba.org/?p=rsync.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 8809f65b1394de9027fa73a0bc4dad84a8e036fd
Author: Wayne Davison <wayne at opencoder.net>
Date:   Tue May 26 22:28:22 2020 -0700

    A couple minor tweaks.

-----------------------------------------------------------------------

Summary of changes:
 compat.c  | 34 +++++++++++++++++-----------------
 options.c |  2 ++
 2 files changed, 19 insertions(+), 17 deletions(-)


Changeset truncated at 500 lines:

diff --git a/compat.c b/compat.c
index ccf9c3d7..a124c200 100644
--- a/compat.c
+++ b/compat.c
@@ -353,7 +353,14 @@ int get_default_nno_list(struct name_num_obj *nno, char *to_buf, int to_buf_len,
 {
 	struct name_num_item *nni;
 	int len = 0, cnt = 0;
-	char pre_char = '\0', post_char = '\0';
+	char delim = '\0', post_delim;
+
+	switch (dup_markup) {
+	case '(': post_delim = ')'; break;
+	case '[': post_delim = ']'; break;
+	case '{': post_delim = '}'; break;
+	default: post_delim = '\0'; break;
+	}
 
 	init_nno_saw(nno, 0);
 
@@ -361,26 +368,20 @@ int get_default_nno_list(struct name_num_obj *nno, char *to_buf, int to_buf_len,
 		if (nni->main_name) {
 			if (!dup_markup)
 				continue;
-			pre_char = dup_markup;
-			switch (pre_char) {
-			case '(': post_char = ')'; break;
-			case '[': post_char = ']'; break;
-			case '{': post_char = '}'; break;
-			default: break;
-			}
+			delim = dup_markup;
 		}
 		if (len)
 			to_buf[len++]= ' ';
-		if (pre_char) {
-			to_buf[len++]= pre_char;
-			pre_char = '\0';
+		if (delim) {
+			to_buf[len++]= delim;
+			delim = post_delim;
 		}
 		len += strlcpy(to_buf+len, nni->name, to_buf_len - len);
 		if (len >= to_buf_len - 3)
 			exit_cleanup(RERR_UNSUPPORTED); /* IMPOSSIBLE... */
-		if (post_char) {
-			to_buf[len++]= post_char;
-			post_char = '\0';
+		if (delim) {
+			to_buf[len++]= delim;
+			delim = '\0';
 		}
 		nno->saw[nni->num] = ++cnt;
 	}
@@ -411,9 +412,8 @@ static void send_negotiate_str(int f_out, struct name_num_obj *nno, const char *
 	} else
 		list_str = NULL;
 
-	if (!list_str || !*list_str) {
-		len = get_default_nno_list(nno, tmpbuf, sizeof tmpbuf, '\0');
-	}
+	if (!list_str || !*list_str)
+		len = get_default_nno_list(nno, tmpbuf, MAX_NSTR_STRLEN, '\0');
 
 	if (DEBUG_GTE(NSTR, am_server ? 3 : 2)) {
 		if (am_server)
diff --git a/options.c b/options.c
index d5b648cb..1650780e 100644
--- a/options.c
+++ b/options.c
@@ -605,6 +605,8 @@ static void print_capabilities(enum logcode f)
 #endif
 			"IPv6",
 
+		"batchfiles",
+
 #ifndef HAVE_FTRUNCATE
 		"no "
 #endif


-- 
The rsync repository.



More information about the rsync-cvs mailing list