| 407 | } |
| 408 | |
| 409 | static const char *getenv_nstr(int ntype) |
| 410 | { |
| 411 | const char *env_str = getenv(ntype == NSTR_COMPRESS ? "RSYNC_COMPRESS_LIST" : "RSYNC_CHECKSUM_LIST"); |
| 412 | |
| 413 | /* When writing a batch file, we always negotiate an old-style choice. */ |
| 414 | if (write_batch) |
| 415 | env_str = ntype == NSTR_COMPRESS ? "zlib" : protocol_version >= 30 ? "md5" : "md4"; |
| 416 | |
| 417 | if (am_server && env_str) { |
| 418 | const char *cp = strchr(env_str, '&'); |
| 419 | if (cp) |
| 420 | env_str = cp + 1; |
| 421 | } |
| 422 | |
| 423 | return env_str; |
| 424 | } |
| 425 | |
| 426 | void validate_choice_vs_env(int ntype, int num1, int num2) |
| 427 | { |
no outgoing calls
no test coverage detected