outputs: show MPD error message on stderr
authorKurt Van Dijck <dev.kurt@vandijck-laurijssen.be>
Sat, 2 May 2015 12:36:02 +0000 (14:36 +0200)
committerKurt Van Dijck <dev.kurt@vandijck-laurijssen.be>
Sat, 2 May 2015 12:36:02 +0000 (14:36 +0200)
src/mpd_client.c

index d61e82f..48772bc 100644 (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;