Skip to content
Snippets Groups Projects
Commit 9fe81565 authored by Steven Murray's avatar Steven Murray
Browse files

Put back the feature of using the PATH_CONFIG environment variable to

override the default location of the CASTOR configuration file.  This feature
is used for testing this part of the code.
parent 1288561f
No related branches found
No related tags found
No related merge requests found
......@@ -53,7 +53,15 @@ extern "C" char *getconfent_fromfile(const char *filename,
char *getconfent(const char *category,
const char *name,
int flags) {
return getconfent_fromfile(PATH_CONFIG,category,name,flags);
// Try to get the location of the configuration file from the environment
// variable named PATH_CONFIG. If the enviornment variable is not set then
// fall back to the compile-time default.
const char *configFilename = getenv("PATH_CONFIG");
if(NULL == configFilename) {
configFilename = PATH_CONFIG;
}
return getconfent_fromfile(configFilename,category,name,flags);
}
int getconfent_parser(char **conf_val,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment