File: 0007-Fix-timeout-when-connecting-to-a-slow-mpd.patch

package info (click to toggle)
gmpc 11.8.16-23
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 20,600 kB
  • sloc: ansic: 51,080; sh: 10,438; makefile: 1,748; xml: 9
file content (24 lines) | stat: -rw-r--r-- 1,058 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From: Etienne Millon <etienne.millon@gmail.com>
Date: Wed, 18 Jan 2012 10:29:26 +0100
Subject: Fix timeout when connecting to a slow mpd

Origin: upstream, http://musicpd.org/mantis/file_download.php?file_id=948&type=bug
Bug: http://musicpd.org/mantis/print_bug_page.php?bug_id=3403
Bug-Debian: http://bugs.debian.org/656290
---
 src/Tools/mpdinteraction.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Tools/mpdinteraction.c b/src/Tools/mpdinteraction.c
index 31aa63c..bd3aecd 100644
--- a/src/Tools/mpdinteraction.c
+++ b/src/Tools/mpdinteraction.c
@@ -147,7 +147,7 @@ static int connected_to_mpd(mpd_Connection * mpd_conn)
 
 static void connection_thread(void)
 {
-	mpd_Connection *conn = mpd_newConnection(connection_get_hostname(), connection_get_port(), DEFAULT_TIMEOUT);
+	mpd_Connection *conn = mpd_newConnection(connection_get_hostname(), connection_get_port(), cfg_get_single_value_as_float_with_default(config, "connection", "timeout", DEFAULT_TIMEOUT));
 	g_idle_add((GSourceFunc) connected_to_mpd, conn);
 	return;
 }