outputs: show MPD error message on stderr

This commit is contained in:
Kurt Van Dijck 2015-05-02 14:36:02 +02:00
parent c3ddc8318b
commit d125f0a1d3
1 changed files with 2 additions and 1 deletions

View File

@ -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;