diff --git a/ChangeLog b/ChangeLog index d9a34688..de4a21f3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2009-05-31 + * Fix hostname resolution for mpd_host + 2009-05-24 * Added fancy new 'temperature gradients' feature for graphs, via the -t switch at the end of graph arguments. diff --git a/src/libmpdclient.c b/src/libmpdclient.c index 6e2b2614..3df620a9 100644 --- a/src/libmpdclient.c +++ b/src/libmpdclient.c @@ -126,9 +126,13 @@ static int mpd_connect(mpd_Connection *connection, const char *host, int port, struct addrinfo *res = NULL; struct addrinfo *addrinfo = NULL; - /* Setup hints */ + /* Setup hints + * + * XXX: limit address family to PF_INET here. + * MPD does not support IPv6 yet, so if GAI returns + * an IPv6 address, the later connect() will fail. */ hints.ai_flags = AI_ADDRCONFIG; - hints.ai_family = PF_UNSPEC; + hints.ai_family = PF_INET; hints.ai_socktype = SOCK_STREAM; hints.ai_protocol = IPPROTO_TCP; hints.ai_addrlen = 0;