summaryrefslogtreecommitdiffstats
path: root/src/c_mpdview.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/c_mpdview.c')
-rw-r--r--src/c_mpdview.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/c_mpdview.c b/src/c_mpdview.c
index 0fa059c..40166d4 100644
--- a/src/c_mpdview.c
+++ b/src/c_mpdview.c
@@ -51,6 +51,9 @@
#include <mpd/client.h>
#include <mpd/connection.h>
+#include <mpd/error.h>
+
+#include "c_mpdview.h"
int
main
@@ -64,6 +67,9 @@ main
if (conn == NULL) {
return (EXIT_FAILURE);
}
+ if (mpd_connection_get_error(conn) != MPD_ERROR_SUCCESS) {
+ dprintf(STDERR_FILENO, "%s: %s\n", PROGNAME, mpd_connection_get_error_message(conn));
+ }
(void)conn;
(void)argc;
(void)argv;