URI:
       tDistinguish between no song playing versus mpd error - spoon - dwm status utility (2f30 fork)
  HTML git clone git://src.adamsgaard.dk/spoon
   DIR Log
   DIR Files
   DIR Refs
   DIR LICENSE
       ---
   DIR commit a0dad9bb5687f35a14c415828a24d84f1ffc1fbe
   DIR parent 2fc1f4927f97a4a86c887d67b6e9124d26afee7d
  HTML Author: sin <sin@2f30.org>
       Date:   Mon, 26 Sep 2016 16:48:33 +0100
       
       Distinguish between no song playing versus mpd error
       
       We were hitting this when killing mpd.  Because conn was non-NULL
       we would never attempt to reconnect.
       
       Diffstat:
         M spoon.c                             |       7 ++++++-
       
       1 file changed, 6 insertions(+), 1 deletion(-)
       ---
   DIR diff --git a/spoon.c b/spoon.c
       t@@ -61,8 +61,13 @@ mpdread(char *buf, size_t len)
                mpd_send_current_song(conn);
                song = mpd_recv_song(conn);
                /* if no song is playing, reuse connection next time */
       -        if (song == NULL)
       +        if (song == NULL) {
       +                if (mpd_connection_get_error(conn) != MPD_ERROR_SUCCESS) {
       +                        ret = -1;
       +                        goto out;
       +                }
                        return -1;
       +        }
                artist = mpd_song_get_tag(song, MPD_TAG_ARTIST, 0);
                title = mpd_song_get_tag(song, MPD_TAG_TITLE, 0);
                if (artist != NULL && title != NULL) {