From ebba164a0da10a93e337fd5d84c09a354ebb4156 Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Tue, 29 Sep 2015 23:14:44 +0200 Subject: [PATCH] Change MPD deinit position so it matches the init order, and so it will not get called if httpd fails to start --- src/main.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/main.c b/src/main.c index 443d63af..e52209c8 100644 --- a/src/main.c +++ b/src/main.c @@ -827,17 +827,16 @@ main(int argc, char **argv) remote_pairing_deinit(); remote_fail: +#ifdef MPD + DPRINTF(E_LOG, L_MAIN, "MPD deinit\n"); + mpd_deinit(); + + mpd_fail: +#endif DPRINTF(E_LOG, L_MAIN, "HTTPd deinit\n"); httpd_deinit(); httpd_fail: - DPRINTF(E_LOG, L_MAIN, "TCPd deinit\n"); -#ifdef MPD - DPRINTF(E_LOG, L_MAIN, "MPD deinit\n"); - mpd_deinit(); - mpd_fail: -#endif - DPRINTF(E_LOG, L_MAIN, "Player deinit\n"); player_deinit();