Skip to content
Commit b427927f authored by Adrian Reber's avatar Adrian Reber Committed by Andrei Vagin
Browse files

config: use dynamic variables for configuration files



The code to read and parse configuration files was writing the result of
the global configuration file to one variable and the result from the
configuration file in the user's home to another variable:

  char **global_conf = NULL;
  char **user_conf = NULL;

With this change the code now uses dynamic memory allocation to handle
the different configuration files.

It used to be:

  * parse global config
  * parse user config
  * evaluate global config
  * evaluate user config
  * evaluate CLI

And now it is:

  * parse global config
  * evaluate global config
  * parse user config
  * evaluate user config
  * evaluate CLI

This change is in preparation for the upcoming setting of a
configuration file via environment variable and RPC configuration file
usage.

Signed-off-by: default avatarAdrian Reber <areber@redhat.com>
Signed-off-by: default avatarAndrei Vagin <avagin@virtuozzo.com>
parent 4bd4b5fc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment