diff options
author | Joe <bousset.rudy@gmail.com> | 2022-06-27 22:52:27 +0200 |
---|---|---|
committer | Joe <bousset.rudy@gmail.com> | 2022-06-27 22:52:27 +0200 |
commit | 670a6d3bdf7a3e4b38b449fb54fd24a0acc6d935 (patch) | |
tree | 84e317ddd08439098f690fc51a75c5f4b12ae4d0 | |
parent | WIP (diff) | |
download | mpdview-670a6d3bdf7a3e4b38b449fb54fd24a0acc6d935.tar.gz mpdview-670a6d3bdf7a3e4b38b449fb54fd24a0acc6d935.tar.bz2 mpdview-670a6d3bdf7a3e4b38b449fb54fd24a0acc6d935.tar.xz mpdview-670a6d3bdf7a3e4b38b449fb54fd24a0acc6d935.tar.zst mpdview-670a6d3bdf7a3e4b38b449fb54fd24a0acc6d935.zip |
Ok
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | src/c_mpdview.c | 6 |
2 files changed, 7 insertions, 1 deletions
@@ -46,7 +46,7 @@ CFLAGS += -isystem/usr/local/include # CFLAGS += -march=native -O2 -pipe LDFLAGS := -L/usr/local/lib -LDFLAGS += -lmpd +LDFLAGS += -lmpdclient RM := rm -f MKDIR := mkdir -p 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; |