summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-08-19 22:36:52 +0200
committerMax Kellermann <max@musicpd.org>2018-08-19 22:36:52 +0200
commitc99416fbe0894c55106075a6a81177733a371b18 (patch)
treef5afc724e472398561e6a2a279f4f970a96da827 /test
parent3caef29b93a6f52dde1e6b565c967bf0fb612654 (diff)
test/dump_playlist: allocate ConfigData on the stack
Diffstat (limited to 'test')
-rw-r--r--test/dump_playlist.cxx17
1 files changed, 9 insertions, 8 deletions
diff --git a/test/dump_playlist.cxx b/test/dump_playlist.cxx
index a14268a41..4bd3db76b 100644
--- a/test/dump_playlist.cxx
+++ b/test/dump_playlist.cxx
@@ -22,7 +22,9 @@
#include "song/DetachedSong.hxx"
#include "playlist/SongEnumerator.hxx"
#include "input/InputStream.hxx"
-#include "config/Global.hxx"
+#include "config/File.hxx"
+#include "config/Migrate.hxx"
+#include "config/Data.hxx"
#include "decoder/DecoderList.hxx"
#include "input/Init.hxx"
#include "event/Thread.hxx"
@@ -60,16 +62,16 @@ try {
/* initialize MPD */
- config_global_init();
-
- ReadConfigFile(config_path);
+ ConfigData config;
+ ReadConfigFile(config, config_path);
+ Migrate(config);
EventThread io_thread;
io_thread.Start();
- input_stream_global_init(GetGlobalConfig(), io_thread.GetEventLoop());
- playlist_list_global_init(GetGlobalConfig());
- decoder_plugin_init_all(GetGlobalConfig());
+ input_stream_global_init(config, io_thread.GetEventLoop());
+ playlist_list_global_init(config);
+ decoder_plugin_init_all(config);
/* open the playlist */
@@ -122,7 +124,6 @@ try {
decoder_plugin_deinit_all();
playlist_list_global_finish();
input_stream_global_finish();
- config_global_finish();
return EXIT_SUCCESS;
} catch (...) {