MCPcopy Create free account
hub / github.com/RsyncProject/rsync / getenv_nstr

Function getenv_nstr

compat.c:409–424  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

407}
408
409static 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
426void validate_choice_vs_env(int ntype, int num1, int num2)
427{

Callers 2

validate_choice_vs_envFunction · 0.85
send_negotiate_strFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected