Skip to content

Commit

Permalink
environment is meant as an override for sysconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
bradh352 committed Nov 22, 2023
1 parent 2985ce3 commit b674abd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
11 changes: 6 additions & 5 deletions src/lib/ares_sysconfig.c
Expand Up @@ -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__)
Expand All @@ -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;
Expand Down
1 change: 0 additions & 1 deletion src/lib/ares_sysconfig_files.c
Expand Up @@ -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);
}

Expand Down

0 comments on commit b674abd

Please sign in to comment.