From abc5e2984cb16148abec9e36b17adba6f233a72c Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 9 Jul 2017 13:57:47 +0200 Subject: [PATCH] afs: Improve error diagnostics. If the given mood or playlist could not be opened, we silently switch to the dummy mood. Let's tell the user what has happened, and why. --- afs.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/afs.c b/afs.c index 59595567..fc93675a 100644 --- a/afs.c +++ b/afs.c @@ -615,8 +615,13 @@ EXPORT_SERVER_CMD_HANDLER(select); static void init_admissible_files(const char *arg) { - if (activate_mood_or_playlist(arg, NULL) < 0) + int ret = activate_mood_or_playlist(arg, NULL); + if (ret < 0) { + assert(arg); + PARA_WARNING_LOG("could not activate %s: %s\n", arg, + para_strerror(-ret)); activate_mood_or_playlist(NULL, NULL); /* always successful */ + } } static int setup_command_socket_or_die(void) -- 2.39.2