diff options
author | Wayne Davison <wayne@opencoder.net> | 2020-05-24 19:16:05 -0700 |
---|---|---|
committer | Wayne Davison <wayne@opencoder.net> | 2020-05-24 19:16:05 -0700 |
commit | 6efc43cc0aea9ae3e0e3b0ec36cd7cf3d12be15b (patch) | |
tree | b853bf9f04eeeafe9fcc738cdce56195aed68d54 /compat.c | |
parent | 4496e0e8e7a7616ef64b683edc7a249ee16b5a1b (diff) | |
download | rsync-6efc43cc0aea9ae3e0e3b0ec36cd7cf3d12be15b.tar.gz |
Fix -z choice with older rsyncs.
Diffstat (limited to 'compat.c')
-rw-r--r-- | compat.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -174,7 +174,9 @@ void parse_compress_choice(int final_call) exit_cleanup(RERR_UNSUPPORTED); } do_compression = nni->num; - } else + } else if (do_compression) + do_compression = CPRES_ZLIB; + else do_compression = CPRES_NONE; if (do_compression == CPRES_NONE) @@ -184,8 +186,10 @@ void parse_compress_choice(int final_call) const char *c_s = am_server ? "Server" : "Client"; if (valid_compressions.negotiated_name) rprintf(FINFO, "%s negotiated compress: %s\n", c_s, valid_compressions.negotiated_name); - else - rprintf(FINFO, "%s compress: %s\n", c_s, do_compression ? compress_choice : "none"); + else { + struct name_num_item *nni = get_nni_by_num(&valid_compressions, do_compression); + rprintf(FINFO, "%s compress: %s\n", c_s, nni ? nni->name : "UNKNOWN"); + } } } |