1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-17 18:45:10 +00:00

fix var clearing stuff in mpd thread

git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@946 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
Brenden Matthews 2007-09-01 20:36:56 +00:00
parent 0863020b6e
commit c09d5346a0

View File

@ -88,12 +88,12 @@ void *update_mpd(void)
}
timed_thread_lock(mpd_timed_thread);
clear_mpd_stats(current_info);
if (current_info->conn->error || current_info->conn == NULL) {
//ERR("%MPD error: s\n", current_info->conn->errorStr);
mpd_closeConnection(current_info->conn);
current_info->conn = 0;
clear_mpd_stats(current_info);
strncpy(current_info->mpd.status, "MPD not responding", TEXT_BUFFER_SIZE - 1);
timed_thread_unlock(mpd_timed_thread);
@ -108,6 +108,7 @@ void *update_mpd(void)
//ERR("MPD error: %s\n", current_info->conn->errorStr);
mpd_closeConnection(current_info->conn);
current_info->conn = 0;
clear_mpd_stats(current_info);
strncpy(current_info->mpd.status, "MPD not responding", TEXT_BUFFER_SIZE - 1);
timed_thread_unlock(mpd_timed_thread);
@ -142,6 +143,7 @@ void *update_mpd(void)
}
if (status->state == MPD_STATUS_STATE_UNKNOWN) {
// current_info was already cleaned up by clear_mpd_stats()
*current_info->mpd.status=0;
}
if (status->state == MPD_STATUS_STATE_PLAY ||
status->state == MPD_STATUS_STATE_PAUSE) {