Introduction
Introduction Statistics Contact Development Disclaimer Help
tDon't free connection if no song is playing, just reuse it - spoon - dwm statu…
git clone git://src.adamsgaard.dk/spoon
Log
Files
Refs
LICENSE
---
commit 97e55bd632212da6432ab1d6c00bb5f97604abe4
parent f73613f6c56516c7a3f36cc4e23b1861e563ff7d
Author: sin <[email protected]>
Date: Mon, 26 Sep 2016 16:35:37 +0100
Don't free connection if no song is playing, just reuse it
Diffstat:
M spoon.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/spoon.c b/spoon.c
t@@ -58,10 +58,9 @@ mpdread(char *buf, size_t len)
}
mpd_send_current_song(conn);
song = mpd_recv_song(conn);
- if (song == NULL) {
- ret = -1;
- goto out;
- }
+ /* if no song is playing, reuse connection next time */
+ if (song == NULL)
+ return -1;
artist = mpd_song_get_tag(song, MPD_TAG_ARTIST, 0);
title = mpd_song_get_tag(song, MPD_TAG_TITLE, 0);
if (artist != NULL && title != NULL) {
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.