1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2025-02-04 13:08:31 +00:00

* _Really_ fix mpd SIGPIPE issues

git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@942 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
Brenden Matthews 2007-08-31 18:32:51 +00:00
parent ccff449e2e
commit ef272217d9
2 changed files with 20 additions and 13 deletions

View File

@ -1,5 +1,8 @@
# $Id$
2007-08-31
* _Really_ fix mpd SIGPIPE issues
2007-08-30
* Conky 1.4.7 released
* Check for pkg-config >=0.19

View File

@ -95,10 +95,7 @@ void *update_mpd(void)
timed_thread_lock(mpd_timed_thread);
mpd_Status *status;
mpd_InfoEntity *entity;
mpd_sendCommandListOkBegin(current_info->conn);
mpd_sendStatusCommand(current_info->conn);
mpd_sendCurrentSongCommand(current_info->conn);
mpd_sendCommandListEnd(current_info->conn);
if ((status = mpd_getStatus(current_info->conn)) == NULL) {
//ERR("MPD error: %s\n", current_info->conn->errorStr);
mpd_closeConnection(current_info->conn);
@ -109,6 +106,14 @@ void *update_mpd(void)
if (timed_thread_test(mpd_timed_thread)) timed_thread_exit(mpd_timed_thread);
continue;
}
mpd_finishCommand(current_info->conn);
if (current_info->conn->error) {
//fprintf(stderr, "%s\n", current_info->conn->errorStr);
mpd_closeConnection(current_info->conn);
current_info->conn = 0;
if (timed_thread_test(mpd_timed_thread)) timed_thread_exit(mpd_timed_thread);
continue;
}
current_info->mpd.volume = status->volume;
//if (status->error)
@ -161,8 +166,7 @@ void *update_mpd(void)
continue;
}
mpd_nextListOkCommand(current_info->conn);
mpd_sendCurrentSongCommand(current_info->conn);
while ((entity = mpd_getNextInfoEntity(current_info->conn))) {
mpd_Song *song = entity->info.song;
if (entity->type != MPD_INFO_ENTITY_TYPE_SONG) {
@ -215,6 +219,14 @@ void *update_mpd(void)
mpd_freeInfoEntity(entity);
entity = NULL;
}
mpd_finishCommand(current_info->conn);
if (current_info->conn->error) {
//fprintf(stderr, "%s\n", current_info->conn->errorStr);
mpd_closeConnection(current_info->conn);
current_info->conn = 0;
if (timed_thread_test(mpd_timed_thread)) timed_thread_exit(mpd_timed_thread);
continue;
}
timed_thread_unlock(mpd_timed_thread);
if (current_info->conn->error) {
@ -225,14 +237,6 @@ void *update_mpd(void)
continue;
}
mpd_finishCommand(current_info->conn);
if (current_info->conn->error) {
//fprintf(stderr, "%s\n", current_info->conn->errorStr);
mpd_closeConnection(current_info->conn);
current_info->conn = 0;
if (timed_thread_test(mpd_timed_thread)) timed_thread_exit(mpd_timed_thread);
continue;
}
mpd_freeStatus(status);
/* if (current_info->conn) {
mpd_closeConnection(current_info->conn);