environment is meant as an override for sysconfig

pull/635/head
Brad House 1 year ago
parent 2985ce35d0
commit b674abd561
  1. 11
      src/lib/ares_sysconfig.c
  2. 1
      src/lib/ares_sysconfig_files.c

@ -995,11 +995,6 @@ ares_status_t ares__init_by_sysconfig(ares_channel_t *channel)
memset(&sysconfig, 0, sizeof(sysconfig));
status = ares__init_by_environment(&sysconfig);
if (status != ARES_SUCCESS) {
goto done;
}
#ifdef _WIN32
status = ares__init_sysconfig_windows(&sysconfig);
#elif defined(__MVS__)
@ -1020,6 +1015,12 @@ ares_status_t ares__init_by_sysconfig(ares_channel_t *channel)
goto done;
}
/* Environment is supposed to override sysconfig */
status = ares__init_by_environment(&sysconfig);
if (status != ARES_SUCCESS) {
goto done;
}
status = ares_sysconfig_apply(channel, &sysconfig);
if (status != ARES_SUCCESS) {
goto done;

@ -358,7 +358,6 @@ static ares_status_t set_options(ares_sysconfig_t *sysconfig, const char *str)
val = try_option(p, q, "attempts:");
if (val) {
fprintf(stderr, "ATTEMPTS: %d", (int)strtoul(val, NULL, 10));
sysconfig->tries = strtoul(val, NULL, 10);
}

Loading…
Cancel
Save