From c99416fbe0894c55106075a6a81177733a371b18 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 19 Aug 2018 22:36:52 +0200 Subject: [PATCH] test/dump_playlist: allocate ConfigData on the stack --- test/dump_playlist.cxx | 17 +++++++++-------- 1 file 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 (...) {