From: Andre Noll Date: Sun, 9 Jul 2017 11:57:47 +0000 (+0200) Subject: afs: Improve error diagnostics. X-Git-Tag: v0.6.1~25 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=abc5e2984cb16148abec9e36b17adba6f233a72c;p=paraslash.git 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. --- 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)