db/update/Service: add SimpleDatabase reference

Don't use the global variables from the DatabaseSimple library.
This commit is contained in:
Max Kellermann
2014-02-04 08:37:05 +01:00
parent f25ef8d682
commit d76b6f878e
6 changed files with 24 additions and 41 deletions

View File

@@ -68,6 +68,7 @@
#include "db/update/Service.hxx"
#include "db/DatabaseGlue.hxx"
#include "db/DatabaseSimple.hxx"
#include "db/plugins/SimpleDatabasePlugin.hxx"
#endif
#ifdef ENABLE_NEIGHBOR_PLUGINS
@@ -460,7 +461,7 @@ int mpd_main(int argc, char *argv[])
const bool create_db = !glue_db_init_and_load();
instance->update = db_is_simple()
? new UpdateService(*main_loop)
? new UpdateService(*main_loop, db_get_simple())
: nullptr;
#endif