From d125f0a1d36080171ce118fa84df816b7ccaf847 Mon Sep 17 00:00:00 2001 From: Kurt Van Dijck Date: Sat, 2 May 2015 14:36:02 +0200 Subject: [PATCH] outputs: show MPD error message on stderr --- src/mpd_client.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mpd_client.c b/src/mpd_client.c index d61e82f..48772bc 100644 --- a/src/mpd_client.c +++ b/src/mpd_client.c @@ -466,8 +466,9 @@ int mpd_put_outputs(char *buffer, int names) mpd_output_free(out); } if (!mpd_response_finish(mpd.conn)) { + fprintf(stderr, "MPD outputs: %s\n", mpd_connection_get_error_message(mpd.conn)); mpd_connection_clear_error(mpd.conn); - return NULL; + return 0; } str += snprintf(str, strend-str, " }}"); return str-buffer; -- 2.20.1