aboutsummaryrefslogtreecommitdiffstats
path: root/src/Main.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-30 17:52:51 +0100
committerMax Kellermann <max@duempel.org>2013-01-30 21:36:04 +0100
commit595b6a4f6c2a6f12fb2b3c83f4053942844ffa84 (patch)
treebdfaf87414fac0359a8fd2e15911098fbe9d6348 /src/Main.cxx
parentdaa46477125145dd943122c8064c7271a1a9429f (diff)
downloadmpd-595b6a4f6c2a6f12fb2b3c83f4053942844ffa84.tar.gz
mpd-595b6a4f6c2a6f12fb2b3c83f4053942844ffa84.tar.xz
mpd-595b6a4f6c2a6f12fb2b3c83f4053942844ffa84.zip
ConfigFile: add enum ConfigOption
Look up top-level config options by enum (= integer), not by name string.
Diffstat (limited to 'src/Main.cxx')
-rw-r--r--src/Main.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/Main.cxx b/src/Main.cxx
index ecea59843..a22ee6313 100644
--- a/src/Main.cxx
+++ b/src/Main.cxx
@@ -167,12 +167,11 @@ glue_mapper_init(GError **error_r)
static bool
glue_db_init_and_load(void)
{
- const struct config_param *param = config_get_param("database");
+ const struct config_param *param = config_get_param(CONF_DATABASE);
const struct config_param *path = config_get_param(CONF_DB_FILE);
if (param != NULL && path != NULL)
- g_message("Found both 'database' and '" CONF_DB_FILE
- "' setting - ignoring the latter");
+ g_message("Found both 'database' and 'db_file' setting - ignoring the latter");
GError *error = NULL;
bool ret;
@@ -180,10 +179,10 @@ glue_db_init_and_load(void)
if (!mapper_has_music_directory()) {
if (param != NULL)
g_message("Found database setting without "
- CONF_MUSIC_DIR " - disabling database");
+ "music_directory - disabling database");
if (path != NULL)
- g_message("Found " CONF_DB_FILE " setting without "
- CONF_MUSIC_DIR " - disabling database");
+ g_message("Found db_file setting without "
+ "music_directory - disabling database");
return true;
}