small mpd fix (fixes minor breakage in recent mpd improvements)
authorBrenden Matthews <brenden1@rty.ca>
Fri, 28 Sep 2007 19:50:58 +0000 (19:50 +0000)
committerBrenden Matthews <brenden1@rty.ca>
Fri, 28 Sep 2007 19:50:58 +0000 (19:50 +0000)
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@965 7f574dfc-610e-0410-a909-a81674777703

src/mpd.c

index 8e1711b..1462c6b 100644 (file)
--- a/src/mpd.c
+++ b/src/mpd.c
@@ -136,13 +136,14 @@ void *update_mpd(void)
                if (status->state == MPD_STATUS_STATE_STOP) {
                        strncpy(current_info->mpd.status, "Stopped",
                                        TEXT_BUFFER_SIZE - 1);
+                       clear_mpd_stats(current_info);
                }
                if (status->state == MPD_STATUS_STATE_PAUSE) {
                        strncpy(current_info->mpd.status, "Paused",
                                        TEXT_BUFFER_SIZE - 1);
                }
                if (status->state == MPD_STATUS_STATE_UNKNOWN) {
-                       // current_info was already cleaned up by clear_mpd_stats()
+                       clear_mpd_stats(current_info);
                        *current_info->mpd.status=0;
                }
                if (status->state == MPD_STATUS_STATE_PLAY ||