unlock mutexes correctly
authorBrenden Matthews <brenden1@rty.ca>
Sat, 1 Sep 2007 18:18:26 +0000 (18:18 +0000)
committerBrenden Matthews <brenden1@rty.ca>
Sat, 1 Sep 2007 18:18:26 +0000 (18:18 +0000)
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@945 7f574dfc-610e-0410-a909-a81674777703

src/mpd.c

index a0603be..cd2fa8a 100644 (file)
--- a/src/mpd.c
+++ b/src/mpd.c
@@ -96,6 +96,7 @@ void *update_mpd(void)
                        current_info->conn = 0;
 
                        strncpy(current_info->mpd.status, "MPD not responding", TEXT_BUFFER_SIZE - 1);
+                       timed_thread_unlock(mpd_timed_thread);
                        if (timed_thread_test(mpd_timed_thread)) timed_thread_exit(mpd_timed_thread);
                        continue;
                }
@@ -118,6 +119,7 @@ void *update_mpd(void)
                        //fprintf(stderr, "%s\n", current_info->conn->errorStr);
                        mpd_closeConnection(current_info->conn);
                        current_info->conn = 0;
+                       timed_thread_unlock(mpd_timed_thread);
                        if (timed_thread_test(mpd_timed_thread)) timed_thread_exit(mpd_timed_thread);
                        continue;
                }
@@ -231,6 +233,7 @@ void *update_mpd(void)
                        //fprintf(stderr, "%s\n", current_info->conn->errorStr);
                        mpd_closeConnection(current_info->conn);
                        current_info->conn = 0;
+                       timed_thread_unlock(mpd_timed_thread);
                        if (timed_thread_test(mpd_timed_thread)) timed_thread_exit(mpd_timed_thread);
                        continue;
                }