mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-17 18:45:10 +00:00
* Fixed bug in libmpdclient that caused file descriptors to be left open.
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1080 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
parent
70b9a1bf2e
commit
3efefaf182
@ -4,6 +4,7 @@
|
||||
* Increased C99 compliance.
|
||||
* Fixed potential segfault in get_ioscheduler().
|
||||
* Implemented upwards path traversal for fs_type.
|
||||
* Fixed bug in libmpdclient that caused file descriptors to be left open.
|
||||
|
||||
2008-03-28
|
||||
* Fixed messed up percentages (fs_free_perc, fs_used_perc, mpd_percent,
|
||||
|
@ -27,7 +27,11 @@
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
* */
|
||||
|
||||
#include "conky.h"
|
||||
#include "libmpdclient.h"
|
||||
@ -113,7 +117,7 @@ static int do_connect_fail(mpd_Connection *connection,
|
||||
|
||||
fcntl(connection->sock, F_SETFL, flags | O_NONBLOCK);
|
||||
return (connect(connection->sock, serv_addr, addrlen) < 0
|
||||
&& errno != EINPROGRESS);
|
||||
|| errno != EINPROGRESS);
|
||||
}
|
||||
#endif /* !WIN32 */
|
||||
|
||||
|
@ -152,7 +152,7 @@ void *update_mpd(void *arg)
|
||||
timed_thread_lock(mpd_timed_thread);
|
||||
|
||||
if (current_info->conn->error || current_info->conn == NULL) {
|
||||
// ERR("%MPD error: s\n", current_info->conn->errorStr);
|
||||
ERR("MPD error: %s\n", current_info->conn->errorStr);
|
||||
mpd_closeConnection(current_info->conn);
|
||||
current_info->conn = 0;
|
||||
clear_mpd_stats(current_info);
|
||||
@ -168,7 +168,7 @@ void *update_mpd(void *arg)
|
||||
|
||||
mpd_sendStatusCommand(current_info->conn);
|
||||
if ((status = mpd_getStatus(current_info->conn)) == NULL) {
|
||||
// ERR("MPD error: %s\n", current_info->conn->errorStr);
|
||||
ERR("MPD error: %s\n", current_info->conn->errorStr);
|
||||
mpd_closeConnection(current_info->conn);
|
||||
current_info->conn = 0;
|
||||
clear_mpd_stats(current_info);
|
||||
|
Loading…
Reference in New Issue
Block a user