The branch, master has been updated
       via  4af8403a Fix negotiation of none & improve NSTR debug msgs.
      from  2f84a6bd Add support for negotiated checksum names.

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


- Log -----------------------------------------------------------------
commit 4af8403aa2ea8307a5b2df4ff827ee76606b21a1
Author: Wayne Davison <wa...@opencoder.net>
Date:   Sun May 24 13:34:47 2020 -0700

    Fix negotiation of none & improve NSTR debug msgs.

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

Summary of changes:
 checksum.c |  2 +-
 compat.c   | 21 ++++++++++++++-------
 2 files changed, 15 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/checksum.c b/checksum.c
index 60e0b55f..2e804c47 100644
--- a/checksum.c
+++ b/checksum.c
@@ -60,7 +60,7 @@ struct name_num_obj valid_checksums = {
 #endif
                { CSUM_MD5, "md5", NULL },
                { CSUM_MD4, "md4", NULL },
-               { CSUM_NONE, "none", "" }, /* The "" prevents us from listing 
this name by default */
+               { CSUM_NONE, "none", NULL },
                { 0, NULL, NULL }
        }
 };
diff --git a/compat.c b/compat.c
index 04d8b8ef..410e6f69 100644
--- a/compat.c
+++ b/compat.c
@@ -93,7 +93,7 @@ int filesfrom_convert = 0;
 struct name_num_obj valid_compressions = {
        "compress", NULL, NULL, 0, 0, {
                { CPRES_ZLIB, "zlib", NULL },
-               { CPRES_NONE, "none", "" }, /* The "" prevents us from listing 
this name by default */
+               { CPRES_NONE, "none", NULL },
                { 0, NULL, NULL }
        }
 };
@@ -234,8 +234,7 @@ static int parse_nni_str(struct name_num_obj *nno, const 
char *from, char *tobuf
                                                        to = tok - 1;
                                                        break;
                                                }
-                                       } else
-                                               nni->main_name = NULL; /* 
Override a "" entry */
+                                       }
                                } else
                                        to = tok - (tok != tobuf);
                                tok = NULL;
@@ -267,8 +266,12 @@ static void recv_negotiate_str(int f_in, struct 
name_num_obj *nno, char *tmpbuf,
        if (len < 0)
                len = read_vstring(f_in, tmpbuf, MAX_NSTR_STRLEN);
 
-       if (DEBUG_GTE(NSTR, am_server ? 4 : 2))
-               rprintf(FINFO, "Server %s list: %s%s\n", nno->type, tmpbuf, 
am_server ? " (on server)" : "");
+       if (DEBUG_GTE(NSTR, am_server ? 4 : 2)) {
+               if (am_server)
+                       rprintf(FINFO, "Client %s list (on server): %s\n", 
nno->type, tmpbuf);
+               else
+                       rprintf(FINFO, "Server %s list (on client): %s\n", 
nno->type, tmpbuf);
+       }
 
        if (len > 0) {
                int best = nno->saw_len; /* We want best == 1 from the client 
list, so start with a big number. */
@@ -337,8 +340,12 @@ static void send_negotiate_str(int f_out, struct 
name_num_obj *nno, const char *
                }
        }
 
-       if (DEBUG_GTE(NSTR, am_server ? 4 : 2))
-               rprintf(FINFO, "Client %s list: %s%s\n", nno->type, tmpbuf, 
am_server ? " (on server)" : "");
+       if (DEBUG_GTE(NSTR, am_server ? 4 : 2)) {
+               if (am_server)
+                       rprintf(FINFO, "Server %s list (on server): %s\n", 
nno->type, tmpbuf);
+               else
+                       rprintf(FINFO, "Client %s list (on client): %s\n", 
nno->type, tmpbuf);
+       }
 
        if (local_server) {
                /* A local server doesn't bother to send/recv the strings, it 
just constructs


-- 
The rsync repository.

_______________________________________________
rsync-cvs mailing list
rsync-cvs@lists.samba.org
https://lists.samba.org/mailman/listinfo/rsync-cvs

Reply via email to