aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-08-08 08:36:14 +0200
committerMax Kellermann <max@duempel.org>2012-08-08 09:28:13 +0200
commitb46bb611b331869734c687394b8d0a516052798e (patch)
tree7c181f67f27b1a7619cee718accdf39d81426ea3 /src/main.c
parentaa55d759f555782dc9cf2f9f6d489502310490a6 (diff)
downloadmpd-b46bb611b331869734c687394b8d0a516052798e.tar.gz
mpd-b46bb611b331869734c687394b8d0a516052798e.tar.xz
mpd-b46bb611b331869734c687394b8d0a516052798e.zip
DatabaseGlue: pass block to db_init()
Let the caller take care for legacy conversion.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 99918c48c..00bbf7202 100644
--- a/src/main.c
+++ b/src/main.c
@@ -169,9 +169,14 @@ glue_db_init_and_load(void)
if (path == NULL)
MPD_ERROR(CONF_DB_FILE " setting missing");
- if (!db_init(path, &error))
+ struct config_param *param = config_new_param("database", path->line);
+ config_add_block_param(param, "path", path->value, path->line);
+
+ if (!db_init(param, &error))
MPD_ERROR("%s", error->message);
+ config_param_free(param);
+
ret = db_load(&error);
if (!ret)
MPD_ERROR("%s", error->message);