From: Kurt Van Dijck Date: Sat, 2 May 2015 12:36:02 +0000 (+0200) Subject: outputs: show MPD error message on stderr X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=d125f0a1d36080171ce118fa84df816b7ccaf847;p=ympd.git outputs: show MPD error message on stderr --- 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;