db/UpdateWalk: move LocalStorage to Instance

Keep only a reference.
This commit is contained in:
Max Kellermann
2014-02-05 17:50:04 +01:00
parent 144cfe70bf
commit 4c995eb498
8 changed files with 21 additions and 7 deletions

View File

@@ -69,6 +69,7 @@
#include "db/DatabaseGlue.hxx"
#include "db/DatabaseSimple.hxx"
#include "db/plugins/SimpleDatabasePlugin.hxx"
#include "storage/LocalStorage.hxx"
#endif
#ifdef ENABLE_NEIGHBOR_PLUGINS
@@ -209,7 +210,10 @@ glue_db_init_and_load(void)
return true;
SimpleDatabase &db = *(SimpleDatabase *)instance->database;
instance->storage = new LocalStorage(mapper_get_music_directory_utf8(),
mapper_get_music_directory_fs());
instance->update = new UpdateService(*instance->event_loop, db,
*instance->storage,
*instance);
/* run database update after daemonization? */